Week 6

Lecture Notes

Semaphores

Class exercise

Monitors

Semaphore Monitor
wait may or may not block waitC always blocks
signal always has an effect signalC has no effect
if queue is empty
signal unblocks an arbitrary blocked process signalC unblocks the process at the head of the queue
a process unblocked by signal can resume execution immediately a process unblocked by signalC must wait for the signaling process to leave monitor

Midterm Programming Assignment