Condition Synchronization

Condition Synchronization

In addition to mutual exclusion, monitors need to be handle the more general problem of inter-thread synchronization. Hoare in his class paper* on monitors proposed condition variables which are simply FIFO queues of suspended threads.

*Hoare C.A.R.(1974). Monitors: an Operating System Structuring Concept. Communications of the ACM, 17(10), 549-57.

Suspend execution of calling thread.

Place thread on condition queue c.

wait (c)

Resume execution of thread at the head of c.

signal(c)

They are called condition variables (queues) since they are used to signal that some

condition within the monitor holds ie. value_== 0 or buffer_empty.

Previous slide Next slide Back to the first slide View Graphic Version