GATEverse
← GATE CSE 1995

Q19

NATMarks unknown

Consider the following program segment for concurrent processing using semaphore operators PP and VV for synchronization. Draw the precedence graph for the statements S1S_1 to S9S_9. var a,b,c,d,e,f,g,h,i,j,k : semaphore; begin cobegin begin S1; V(a); V(b) end; begin P(a); S2; V(c); V(d) end; begin P(c); S4; V(e) end; begin P(d); S5; V(f) end; begin P(e); P(f); S7; V(k) end begin P(b); S3; V(g); V(h) end; begin P(g); S6; V(i) end; begin P(h); P(i); S8; V(j) end; begin P(j); P(k); S9 end; coend end;

Sign in to save attempts.

Loading…