PPT Slide
Counting Semaphores
- The semaphore is a counter rather than a binary flag.
- Permits more complex process synchronization, like allowing more than one process at a time into the critical section.
- Page 313/314 show pseudo code for Wait()/Signal() using counting semaphores.
- Page 314/315 show Producer/Consumer with N buffers.
- Notice how the synchronization and data transfer is decoupled using semaphores, unlike using message queues. Semaphores are easier to implement, however. Threads commonly use semaphores.