Download presentation
Presentation is loading. Please wait.
1
Process Synchronization
12/03/15 Taken largely from:
2
Process Synchronization?
Process Synchronization means sharing system resources by processes in a such a way that concurrent access to shared data is handled, thereby minimizing the chance of inconsistent data. Maintaining data consistency demands mechanisms to ensure synchronized execution of cooperating processes. Process Synchronization was introduced to handle problems that arose while multiple process are in execution.
3
Critical Section Code segment accessing shared variables
Executed as an atomic action Multiple “cooperating” processes Only one process in critical section at a time
4
Critical Section Code
5
Critical Section Solution Must Provide
Mutual Exclusion – one at a time Progress – if critical section available and processes waiting for it, one must get it Bounded Waiting – must be a limit on how long process must wait
6
Implementing Critical Section
Hardware – difficult and expensive Software Mutex lock (see diagram above) Semaphore Wait – P Signal – V Binary Semaphore (mutex) or Counting Semaphore (bounded concurrency)
7
Classical Synchronization Problems
Lots of these in OS literature, including Producer - Consumer Reader - Writer Dining Philosophers
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.