Homework3_P231_6.1 Version 0 |
|
👤 Author: by wlm00008 2016-11-01 23:01:46 |
Answer: This algorithm satisfies the three requirements for the critical-section problem.
(1)Mutual exclusion:the flag and turn variables ensure Mutual exclusion according the Prterson's Solution. If both processes set their flag to true, only one will succeed. Namely, the process whose turn it is. The waiting process can only enter its critical section when the other process updates the value of turn.
(2)Progress:This algorithm does not provide strict alternation. Rather, if a process wi