Question: Q . 3 . Resource sharing in a multiprogramming environment will be problematic, when more than one process gets access to the shared resource simultaneously

Q.3. Resource sharing in a multiprogramming environment will be problematic, when more than one process gets access to the shared resource simultaneously (at the same time). To prevent simultaneous multiple access to the shared resources, we may utilize a lock (or flag) sharedvariable to indicate whether the resource is in use or not.
Where in the accessing algorithm;
the processes should initially inspect (check) if the lock is set or not (1 or 0), if notset (0) gets the access, but if it finds the lock set (1) process should wait until the lock is reset to 0 in order to get access. Additionally, when a process ends its access it should reset the lock to 0.
Q.3.a. Above given algorithm (methodology) is said to be problematic. What might be the problem? What is the source of the problem in the above mentioned methodology in coding?
Q.3.b. Peterson's solution provide problem-free solution to the resource sharing problem in multiprogramming environment. What is specific to Peterson's solution? How can it guarantee mutual exclusion?
 Q.3. Resource sharing in a multiprogramming environment will be problematic, when

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!