S
Sweta tiwari Asked a Question July 14, 2021 10:32 am
30 pts - UGC NET
- Computer Science & Applications
Oues. Suppose there are two concurent process P and Q. Using binary semaphore S and T. The code for P & Q is shown below [GATE 2003] Process P Process Q while (1) { while (1) W print 0 print 1 e print 0 print 1 Z: X: Statements inserted at w, x, y, z Which will leads to 0011 0011 0011'? X PS) V(S) P(T) V(T) 1 V(T) P(T) VS) 1 W Y Z S T (A) (B) P(S) 0 (C) PS) VT) P(T) VS) 1 1 (D) P(S) V(T) PT) VT) 1 0 Ans. (B) The sequence of process should be P, Q, P, Q.. S 1 T 0
- 0 Likes
- 1 Comments
- Shares