Basic Synchronization Principles Continue Prof Aiman Hanna Department

Basic Synchronization Principles (Continue) © Prof. Aiman Hanna Department of Computer Science Concordia University Montreal, Canada

Classical Synchronization Problems l Bounded Buffer Problem l Different solutions were discussed, in which some failed l Reasons behind failures 2

Classical Synchronization Problems l Reader-Writer Problem l Different solutions were discussed, in which some failed l Reasons behind failures 3

Difficulties with Semaphores l How semaphores can be implemented l Possible failure if implementation is based on Disable and Enable Interrupts l Need to depend on HW instead of SW to implement semaphores (will be discussed in details during week 5) 4

Difficulties with Semaphores l Different implementation of V() operation l Passive and Active V() l Advantages and disadvantages of each 5

Difficulties with Semaphores l After all, semaphores are powerful and capable of solving synchronization and CS problems, BUT… l Solutions may become very difficult, especially when the problems are relatively bigger/more complicated 6

Difficulties with Semaphores l So, what can be done? Are there any alternatives? l High-level synchronization would provide an alternative to semaphores (this is the subject of Chapter 9, which will covered starting week 5) 7

Where is this week coverage in the textbook? l Chapter 8: l Sections 8. 3 (starting from page 310) & 8. 4. èNote: Figure 8. 17 and Figure 8. 25 will be covered during week 5. 8
- Slides: 8