Question: Two processes P 1 and P 2 are concurrently attempting to access a single resource in a mutually exclusive manner using the semaphore operation wait
Two processes P and P are concurrently attempting to access a single resource in a mutually exclusive manner using the semaphore operation wait It is claimed the wait and signal operations on semaphores must be implemented atomically or in an indivisible fashion. What if this wait is implemented as an ordinary function or procedure without being atomic?
The wait semaphore operation can be defined as
waitsemaphore S
Svalue;
if Svalue
add this process to Slist;
block;
Group of answer choices
There will be no impact
Both P and P could be blocked
Both P and P could be allowed to access the resource
None of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
