CS FundamentalsVery hardGATE CS
Deadlock detection (multi-instance). Available = (0,0,0). Allocation: P0 (0,1,0), P1 (2,0,0), P2 (3,0,3), P3 (2,1,1), P4 (0,0,2). Current Request: P0 (0,0,0), P1 (2,0,2), P2 (0,0,1), P3 (1,0,0), P4 (0,0,2). Which processes are deadlocked?
- A. None
- B. Only P2
- C. P1, P2, P3 and P4
- D. P1 and P2 only
Correct answer: C. P1, P2, P3 and P4
P0 requests nothing, so it can finish and release (0,1,0), giving Work = (0,1,0). No other request fits: P1 needs (2,0,2), P2 needs a C, P3 needs an A, P4 needs two Cs, and nothing else frees up. So P1, P2, P3, P4 are deadlocked.
More Operating Systems questions
- In a resource-allocation graph where EVERY resource type has exactly one instance, which statement is correct?
- Which deadlock-handling idea attacks the CIRCULAR WAIT condition?
- How many of these statements about deadlock are correct? 1. A safe state guarantees that no deadlock will occur if processes follow their…
- Wound-wait and wait-die are timestamp-based deadlock-prevention schemes. Older transactions have smaller timestamps. In WAIT-DIE, what…
- Semaphores S = 1, T = 0, U = 0. X: wait(S); print('A'); signal(T). Y: wait(T); print('B'); signal(U). Z: wait(U); print('C'); signal(S)…
- Semaphores x = 0 and y = 0. P1: print('A'); signal(x); wait(y); print('B'). P2: print('C'); signal(y); wait(x); print('D'). Which of the…