For mutual exclusion with a preemptive scheduler, it is necessary to introduce explicit locks, and machinery that makes requesting processes wait when a lock is unavailable. We considered casting our locks as semaphores, but decided that, compared with monitors, they exert too little structuring discipline on concurrent programs." How do semaphores "exert too little structuring discipline" and how is this remedied by monitors? Construct an example to show how the structuring discipline exerted by monitors could be useful.
For mutual exclusion with a preemptive scheduler, it is necessary to introduce explicit locks, and machinery that makes requesting processes wait when a lock is unavailable. We considered casting our locks as semaphores, but decided that, compared with monitors, they exert too little structuring discipline on concurrent programs."
How do semaphores "exert too little structuring discipline" and how is this remedied by monitors? Construct an example to show how the structuring discipline exerted by monitors could be useful.
Locks and Monitors both are used for the concurrency control between the processes. These two methods provides the mutual exclusion, that means only one process enter the critical section or the shared memory at a time. Exclusive lock is also called as write lock which is acquired by only one process on the same variable at a time.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps