Presentation is loading. Please wait.

Presentation is loading. Please wait.

High-level Synchronization

Similar presentations


Presentation on theme: "High-level Synchronization"— Presentation transcript:

1 High-level Synchronization
Operating Systems High-level Synchronization 1) These notes are © Aiman Hanna. All copyrights reserved. For more information please to: 2) These notes are also based on: Operating Systems, 3rd edition by Garry Nutts, published by Addison Wesley, ISBN-10: | ISBN-13: These notes still totally enforce all copyrights for Nutts/ Addison Wesley. For more information on these rights, please refer to the original publication of the book. 3) VERY IMPORTANT: These notes are neither complete nor sufficient to study for the course. They are merely given so that you can follow the covered subjects. You should NEVER depend solely on these notes for your study. Any use of these notes that results in violation of any of the copyrights indicated above is strictly prohibited. © Dr. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada Data Communications & Computer Networking, by: Aiman Hanna

2 Semaphores - Practical Considerations
Active and Passive V() Busy-wait of the P() operation Implementation of semaphores

3 Implementation of Semaphores
Using Disable and Enable Interrupts Potential failures of such implementation Using Test & Set (TS) instruction

4 Implementation of Semaphores
Using TS to implement binary semaphores Using TS to implement counting/general semaphores

5 High-level Synchronization
Semaphores are powerful, but solutions can become very complex High-level synchronization could provide an alternative

6 High-level Synchronization
Simultaneous P() (also referred to as AND synchronization) NOTE: Although Simultaneous P() is covered and example of usage was discussed in class, you can skip section 9.1 entirely including Simultaneous P()

7 Monitors A high-level synchronization tool that is capable of performing what a semaphore can perform, and vise versa Initial Design of monitors Failure of this design? Reasons?

8 Monitors New design of monitors using conditions
What is a condition, how are they used, and what is their usage rules

9 Classical Synchronization Problems
Solving the 2nd Reader-Writer problem (priority is given to the writers) using monitors and conditions

10 Where is this week coverage in the textbook?
Chapter 8: The remaining parts of Sections 8.3 (including Figure 8.17 and Figure 8.25) Chapter 9: Section 9.2 (until page 349)  Note: The rest of this section/chapter will be covered during the following week  Skip: section 9.1


Download ppt "High-level Synchronization"

Similar presentations


Ads by Google