Semaphores
Section 6.4, 6.5 and 6.6 of the Dinasaur Book.
-
Concept of a Semaphore: P() and V() operations.
-
Semantics
-
Examples:
effect of initializing the semaphore value to 1;
effect of initializing the semaphore value to 0;
effect of initializing the semaphore value to positive integers;
The lecture is partially based on Prof. Tom Andreson's Note on "Semaphores and Their Implementations".
-
Example 1: Implementing Critical Sections
-
Example 2: Bounded Buffers