Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following two processes P[i] and P[j]. Initially, flag[i] = flag [j

ID: 3937989 • Letter: C

Question

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.

Explanation / Answer

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.