Two kinds of Monitors
HOARE Monitors
- SIGNAL(c)
- Run waiter immediately. Signaller blocks right now.
- Condition is guaranteed to hold when blocker runs.
- But, signaller must RESTORE MONITOR INVARIANTS before signalling.
MESA Monitors
- SIGNAL(c)
- waiter is made ready, but the signaller continues.
- Condition is not necessarily true when the waiter runs again.
- Signaller must not restore invariant until it leaves the MONITOR
- either with a WAIT or an explicit return/
- WAKEUP is only a HINT that something must have changed.
- must recheck conditional case.