Now consider a version of the bakery algorithm without the variable choosing. Then we have Int number[n];
Question:
Int number[n];
While (true) {
Number[i] = 1 + getmax (number [], n);
For (int j = 0; j < n; j++) {
While ((number[j]! = 0) && (number[j],j) < (number[i],i)) { };
}
/* critical section */;
Number [i] = 0;
/* remainder */;
}
Does this version violate mutual exclusion? Explain why or why not.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Operating Systems Internals and Design Principles
ISBN: 978-0133805918
8th edition
Authors: William Stallings
Question Posted: