790 likes | 946 Views
2. Outline. BackgroundThe Critical-Section ProblemSynchronization HardwareSemaphoresClassical Problems of SynchronizationCritical RegionsMonitorsOS SynchronizationAtomic Transactions. 3. Background. Concurrent processes (or threads) often need to share data (maintained either in shared memor
E N D
1. Chapter 7 Process Synchronization
2. 2 Outline Background
The Critical-Section Problem
Synchronization Hardware
Semaphores
Classical Problems of Synchronization
Critical Regions
Monitors
OS Synchronization
Atomic Transactions
3. 3 Background Concurrent processes (or threads) often need to share data (maintained either in shared memory or files) and resources
If there is no controlled access to shared data, some processes will obtain an inconsistent view of this data
The action performed by concurrent processes will then depend on the order in which their execution is interleaved
Maintaining data consistency requires mechanisms to ensure the orderly execution of cooperating processes.
Shared-memory solution to bounded-butter problem has a race condition on the class data count
4. 4 Bounded Buffer