6.1 Version 0 |
|
👤 Author: by 1159318719qqcom 2016-11-01 13:58:29 |
This algorithm satisfies the three conditions of mutual exclusion.
(1) Mutual exclusion is ensured through the use of the flag and turn variables. 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 is provided, again through the flag and turn variables. This algorithm does not provide strict alternation. Rather, if a proces