2P13 Week 3.

Slides:



Advertisements
Similar presentations
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
Advertisements

Operating Systems Part III: Process Management (Process Synchronization)
Synchronization and Deadlocks
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Concurrent Programming Problems OS Spring Concurrency pros and cons Concurrency is good for users –One of the reasons for multiprogramming Working.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Concurrent Programming James Adkison 02/28/2008. What is concurrency? “happens-before relation – A happens before B if A and B belong to the same process.
1 CSC321 §2 Concurrent Programming Abstraction & Java Threads Section 2 Concurrent Programming Abstraction & Java Threads.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Operating Systems CMPSC 473 Mutual Exclusion Lecture 13: October 12, 2010 Instructor: Bhuvan Urgaonkar.
1 Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Chapter 2.3 : Interprocess Communication
A. Frank - P. Weisberg Operating Systems Introduction to Cooperating Processes.
Process Synchronization Ch. 4.4 – Cooperating Processes Ch. 7 – Concurrency.
1 Lecture 9: Synchronization  concurrency examples and the need for synchronization  definition of mutual exclusion (MX)  programming solutions for.
Concurrency, Mutual Exclusion and Synchronization.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Introduction to Concurrency.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Mutual Exclusion.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Chapter 7 -1 CHAPTER 7 PROCESS SYNCHRONIZATION CGS Operating System Concepts UCF, Spring 2004.
CY2003 Computer Systems Lecture 04 Interprocess Communication.
Concurrency Control 1 Fall 2014 CS7020: Game Design and Development.
1 Concurrent Processes. 2 Cooperating Processes  Operating systems allow for the creation and concurrent execution of multiple processes  concurrency.
Copyright © Curt Hill Concurrent Execution An Overview for Database.
Exam Review Andy Wang Operating Systems COP 4610 / CGS 5765.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Operating System Chapter 5. Concurrency: Mutual Exclusion and Synchronization Lynn Choi School of Electrical Engineering.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
1 Processes and Threads Part II Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Agenda  Quick Review  Finish Introduction  Java Threads.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee.
December 1, 2006©2006 Craig Zilles1 Threads & Atomic Operations in Hardware  Previously, we introduced multi-core parallelism & cache coherence —Today.
Sarah Diesburg Operating Systems COP 4610
COT 4600 Operating Systems Fall 2009
Process Synchronization: Semaphores
Background on the need for Synchronization
G.Anuradha Reference: William Stallings
Concurrency.
Atomic Operations in Hardware
Atomic Operations in Hardware
OPERATING SYSTEM CONCEPTS
143a discussion session week 3
Definitions Concurrent program – Program that executes multiple instructions at the same time. Process – An executing program (the running JVM for Java.
Concurrency: Mutual Exclusion and Synchronization
CGS 3763 Operating Systems Concepts Spring 2013
Designing Parallel Algorithms (Synchronization)
COP 4600 Operating Systems Spring 2011
CS1550: Quiz #1 Quiz #1.
COT 5611 Operating Systems Design Principles Spring 2014
Process Synchronization
Multithreading.
COT 5611 Operating Systems Design Principles Spring 2012
Lecture 2 Part 2 Process Synchronization
Grades.
Concurrency.
Lesson Objectives Aims Key Words
Concurrency: Mutual Exclusion and Process Synchronization
CS333 Intro to Operating Systems
Andy Wang Operating Systems COP 4610 / CGS 5765
Process Synchronization
Process Synchronization
Andy Wang Operating Systems COP 4610 / CGS 5765
CSE 542: Operating Systems
Chapter 5 Mutual Exclusion(互斥) and Synchronization(同步)
Operating Systems {week 10}
Sarah Diesburg Operating Systems CS 3430
Presentation transcript:

2P13 Week 3

Amdahl’l Law N = Number of processors f = amount of code which is parallel 0.0 < f < 1.0

Capture 5 Concurrency

Table 5.1 Some Key Terms Related to Concurrency atomic operation A function or action implemented as a sequence of one or more instructions that appears to be indivisible; that is, no other process can see an intermediate state or interrupt the operation. The sequence of instruction is guaranteed to execute as a group, or not execute at all, having no visible effect on system state. Atomicity guarantees isolation from concurrent processes. critical section A section of code within a process that requires access to shared resources and that must not be executed while another process is in a corresponding section of code. deadlock A situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something. livelock A situation in which two or more processes continuously change their states in response to changes in the other process(es) without doing any useful work. mutual exclusion The requirement that when one process is in a critical section that accesses shared resources, no other process may be in a critical section that accesses any of those shared resources. race condition A situation in which multiple threads or processes read and write a shared data item and the final result depends on the relative timing of their execution. starvation A situation in which a runnable process is overlooked indefinitely by the scheduler; although it is able to proceed, it is never chosen.

Table 5.2 Degree of Awareness Relationship Influence that One Process Has on the Other Potential Control Problems Processes unaware of each other Competition •Results of one process independent of the action of others •Timing of process may be affected •Mutual exclusion •Deadlock (renewable resource) •Starvation Processes indirectly aware of each other (e.g., shared object) Cooperation by sharing •Results of one process may depend on information obtained from others •Data coherence Processes directly aware of each other (have communication primitives available to them) Cooperation by communication •Deadlock (consumable resource)

The End