Semaphore R=1, S = 3, T = 0; /* initialization */
() {P(S);(‘A’);}?() { (‘B’); (‘C’);V(T); }}() {P(T); (‘D’);V(R);}() {P(R); (‘E’);V(T);}
How many A and B’s are printed when this set of processes runs?
- 2As and 3B
- 3As and any Bs
- 1A and 0B
- Any As and any Bs
Which is the following output sequence is possible when this set of processes runs?
- AEBCBCDAA
- AAABCBCBE
- AAEBCDEAA
- EDEDBCAAA





