critical section PS

0x10. Problem Analysis & IDEA

0x11. problem

critical section

0x12. IDEA: requirements of solution

1. Mutual Exclusion

If process $P_i$ is executing in its critical section, no other processes can be executing in critical section

2. Progress
  1. no process is executing in its critical section
  2. there exist some processes which wish to enter their critical section $\Rightarrow$ selection of the process cannot be postponed indefinitely.
3. Bounded Waiting

A bound must exist between request of entering critical section and granting its request.


0x20. Solution

0x21. HW synchronization primitive

1) TAS; Test-And-Set
2) swap

0x22. low-level (SW) synchronization primitives

0. [(draft yet): Peterson's ALG.]
1. Locks
2. Semaphores

0x23. High Level synchronization Solution

Monitor

0x30. EX

0x31. Bounded-Buffer PS

0x32. Reader-Writer PS

0x33. Dining-Philosopher PS