Consider the following threads, T1, T2 and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2 and S3, operated upon using standard wait( ) and signal( ). The threads can be context switched in any order and at any time.
$${T_1}$$ | $${T_2}$$ | $${T_3}$$ |
---|---|---|
while (true) { wait ($${S_3}$$); print ("C"); signal ($${S_2}$$); } |
while (true) { wait ($${S_1}$$); print ("B"); signal ($${S_3}$$); } |
while (true) { wait ($${S_2}$$); print ("A") signal ($${S_1}$$); } |
Which initialization of the semaphores would print the sequence BCABCABCA....... ?
Which of the following statements is/are TRUE with respect to deadlocks?
Which one of the following statements is FALSE?
Consider four processes P, Q, R and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?