Monitors
The key attribute of a monitor
It can be accessed only by one thread at a time
Methods of a monitor
All the methods of a monitor are executed with mutual exclusion. So at most one thread can execute a method of the monitor at the same time.
MONITOR WITH CONDITION VARIABLES
Condition variables are used when:
– a thread is running in a monitor.
– encounters a condition that is not satisfied, which can only be satisfied by another thread