Q10iib
NATMarks unknownGiven below is solution for the critical section problem of two processes and sharing the following variables: var flag :array [0..1] of boolean; (initially false) turn: 0 .. 1; The program below is for process where process being the other one. repeat flag[i]:= true; while turn != i do begin while flag [j] do skip turn:=i; end critical section flag[i]:=false; until false Determine of the above solution is correct. If it is incorrect, demonstrate with an example how it violates the conditions.
Sign in to save attempts.
Loading…