Question: Consider Petersons solution to the mutual exclusion problem described in Lesson Software Solutions to the Critical Section Problem. Suppose we make a small change to
Consider Petersons solution to the mutual exclusion problem described in Lesson Software Solutions to the Critical Section Problem. Suppose we make a small change to the solution and change the line
turn = other;
to
turn = self;
This change will cause the program to no longer be correct. Describe what can go wrong if this change is made. That is, describe a sequence of events that leads to a situation where either: Both processes can be in their critical section at the same time, or A process wants to enter its critical section, but it cannot and loops innitely waiting to enter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
