Chapter 5 Mutual Exclusion and Synchronization 5.1 Principles of Concurrency ·5.2 Mutua|EXc| usion .5. 3 Semaphores ·54 Monitors 5.5 Message Passing 5.6 Readers /writers problem .5. Summary
2 Chapter 5 Mutual Exclusion and Synchronization • 5.1 Principles of Concurrency • 5.2 Mutual Exclusion • 5.3 Semaphores • 5.4 Monitors • 5.5 Message Passing • 5.6 Readers/Writers Problem • 5.7 Summary
5.3 Semaphores .5.3 1 What is semaphore? 5.3.2 Two Uses of semaphores 5.3.3 Producer/consumer problem 5.3.4 Implement of Semaphores 5.3.5 Semaphore in UNIX
3 5.3 Semaphores • 5.3.1 What is semaphore? • 5.3.2 Two Uses of Semaphores • 5.3.3 Producer/Consumer Problem • 5.3.4 Implement of Semaphores 5.3.5 Semaphore in UNIX
5.3. 1 What is semaphore?(1/ 10) Mutual exclusion d2> ECg / Sif DrDo=S. if arDe >o √
5.3.1 What is semaphore?(1/10) • Mutual exclusion 4
5.3. 1 What is semaphore?(2/ 10) Synchronization a facility that enforces mutual exclusion and event ordering(必须按规定的先后顺序) Common synchronization mechanism Semaphore, Binary semaphore, Mutex, Condition variable, Monitor, Event flags, Messages Asynchronization??
5.3.1 What is semaphore?(2/10) • Synchronization • A facility that enforces mutual exclusion and event ordering(必须按规定的先后顺序). • Common synchronization mechanism: • Semaphore, Binary semaphore, Mutex, Condition variable, Monitor, Event flags, Messages • Asynchronization?? 5
5.3. 1 What is semaphore? (3/10) ⑨8:12 57,500 e●巴V °四图 52,500 /阕图 6,625 常185000 XP750
5.3.1 What is semaphore?(3/10) 6