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.
Please dont post the answer which is already available on website, Also I need the answer for the montior exert on structuring of the program
ANSWER:
Mutual Exclusion:
Mutual exclusion is a property of simultaneous control, which is initiated to forestall race conditions.This issue can be stayed away from by utilizing the prerequisite of mutual exclusion to guarantee that concurrent updates to a similar piece of the rundown can't happen.
As we probably are aware basic segment is a piece of the program where shared assets are gotten to by different co-employable cycle.
The Synchronization system should follow the mutual exclusion conditions.
As an occasion the two cycles P1 and Process P2 have normal code in basic area
Presently in the event that it has entered basic area implies it columns passage code, simultaneously.
To execute then P2 can't go into the basic area that implies assuming cycle P1 is as of now utilizing basic segment
Then, at that point, process P2 isn't permitted to go into the basic segment like a lock that assuming cycle P1 has entered it puts of a lock.
Step by step
Solved in 3 steps with 1 images