100 likes | 249 Views
Operating Systems. Basic Synchronization Principles. © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada. Critical Sections (CSs). What are they? Examples of what may happen if CSs are not handled with care Examples of cooperating processes around CSs.
E N D
Operating Systems Basic Synchronization Principles © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada
Critical Sections (CSs) • What are they? • Examples of what may happen if CSs are not handled with care • Examples of cooperating processes around CSs
Enabling/Disabling Interrupts • Will they provide a solution to the CS problem? • If yes, why cannot we depend on this solution then!
Other Solutions to the CS Problem • Acquiring a lock for example • How can the lock be obtained and released correctly? • Examining different solutions and see why they may fail/work.
Protecting Different CSs • Should one lock be used to protect different CSs? • Why/Why not?
Deadlock • What is it? • Why is it deadly?
Evolving the CS solution • Use of FORK/JOIN • Synchronization
Concurrent Processes • Synchronization between concurrent processes to achieve proper behavior
Semaphores • What is a semaphore? • How can they be used to achieve: • Protection of CSs - Mutual Execution • Proper synchronization/communication between concurrent processes
Where is this week coverage in the textbook? • Chapter 8: • 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.