Consider the following two processes Pi and Pj Initially fla
Consider the following two processes P[i] and P[j]. Initially, flag[i] = flag [j] = false. Do{flag[i]=true; While(flag[j]); critical section flag[i] = false; remainder section} while(1);{do {flag[j]=true: While(flag[i]); critical section flag[j] = false; remainder section} while(1) Does the above program satisfy the \"progress\" requirement? Justify your answer with an informal proof or counterexample. [Simple \"Yes\' or \"No\" without explanation] Is mutual exclusion assured? Justify your answer with an informal proof or counterexample.
Solution
a) Yes because there is no waiting at any stage but only one process is getting all the time in both the programs
>>> in first program \'process i\' and in second program \'process j\' are keep on executing.
b) Mutual exclusion also assured because no two processor are not entering into critical section at a time.
but unbounded wait is happenning here.
![Consider the following two processes P[i] and P[j]. Initially, flag[i] = flag [j] = false. Do{flag[i]=true; While(flag[j]); critical section flag[i] = false; r Consider the following two processes P[i] and P[j]. Initially, flag[i] = flag [j] = false. Do{flag[i]=true; While(flag[j]); critical section flag[i] = false; r](/WebImages/28/consider-the-following-two-processes-pi-and-pj-initially-fla-1075073-1761563722-0.webp)