<aside> 💡 We use semaphores to solve the critical section problem
</aside>
<aside> 💡 Theorem: The semaphore solution for the critical section problem is correct
There is mutual exclusion in the access to the critical section, and the program is free from deadlock and starvation.
</aside>
Monitors provide a structured concurrent programming primitive that concentrates the responsibility for correctness into modules.
If operations of the same monitor are called by more than one process, the implementation ensures that these are executed under mutual exclusion.
<aside> 💡 Only one process at a time can execute a monitor operation, thus we are ensured mutual exclusion
</aside>
If operations of different monitors are called, their executions can be interleaved.
Condition Variables provide syncronization to monitors by providing an ordinary boolean expressions that are used to test the condition, blocking on the condition variable if necessary; a separate statement is used to unblock a process when the condition becomes true.