Now consider a version of the bakery algorithm without the variable choosing. Then we have
1. int number[n];
2. while (true) {
3. number[i] = 1 + getmax(number[], n);
4. for (int j = 0; j
5 while ((number[j] ! = 0) && (number [j],j)<(number[i], i)) { };
6 }
7 /* critical section */;
8 number [i] = 0;
9 /*remainder*/;
10. }
Does this version violate mutual exclusion? Explain why or why not.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.