Basic Synchronization Principles Prof Aiman Hanna Department of
Basic Synchronization Principles © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada
Critical Sections (CSs) l What are they? l Examples of what may happen if CSs are not handled with care l Examples of cooperating processes around CSs 2
Enabling/Disabling Interrupts l Will they provide a solution to the CS problem? l If yes, why cannot we depend on this solution then! 3
Other Solutions to the CS Problem l Acquiring a lock for example l How can the lock be obtained and released correctly? l Examining different solutions and see why they may fail/work. 4
Protecting Different CSs l Should one lock be used to protect different CSs? l Why/Why not? 5
Deadlock l What is it? l Why is it deadly? 6
Evolving the CS solution l Use of FORK/JOIN l Synchronization 7
Concurrent Processes l Synchronization between concurrent processes to achieve proper behavior 8
Semaphores l What is a semaphore? l How can they be used to achieve: l Protection of CSs - Mutual Execution l Proper synchronization/communication between concurrent processes 9
Where is this week coverage in the textbook? l Chapter 8: l Sections 8. 1, 8. 2 & 8. 3 (until page 310), with the following exceptions: èSkip: Figure 8. 1 and Figure 8. 2. This material however will be covered as part of the programming assignment. 10
- Slides: 10