master-degree-notes/Concurrent Systems/notes/4b -.md

676 B

Monitors

Semaphores are hard to use in practice because quite low level Monitors provide an easier definition of concurrent objects at the level of Prog. Lang.

It guarantees mutual exclusion.

Inter-process synchronization is done through conditions, which are objects that provide the following operations:

  • wait: the invoking process suspends, enters into the condition's queue, and releases the mutex on the monitor
  • signal: if no process is in the condition's queue, the nothing happens. Otherwise
    • it reactivates the first suspended process, suspends the signaling process that however has a priority to re-enter the monitor (Hoare semantics)