Question: Assume there are three processors P 1 , P 2 , and P 3 in the spin lock scheme. P 1 starts with the lock

Assume there are three processors P1, P2, and P3 in the "spin lock" scheme. P1 starts with the lock and stores 1 into the lock. Then P1 exits and unlocks the lock. P2 and P3 race to see which reads the unlocked value first. Assume that P3 is satisfied and enters the critical section, which of the following operations is correct?
Group of answer choices
P2 stores 1 into the lock
P2 starts testing and spinning
P2 stops spinning
P2 reads the lock value once

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 Programming Questions!