what is the difference between a mutex and a monitor?
i know the analogy of a mutex.
think of a mutex like a lone runway on a remote airport. Only a single jet can land or take-off from the runway at any given point. No other jet can use the runway simultaneously with the first aircraft.
Could someone help me understand
what is a monitor? how conditional variables helps? and the analogy of how a monitor works?