Question
In Peterson’s solution, what is the purpose of the shared turn variable?
Select an option. Your answer will be checked instantly.
Correct Answer: A. To break a tie when both processes want to enter the critical section
Explanation:
The turn variable gives preference to one process when both intent flags are set.
Together with the flags, it preserves mutual exclusion and progress.
Leave a Reply