CS FundamentalsModerateGATE CS
k processes each need at most 3 instances of a resource that has 7 instances in total. Requests are made one instance at a time. What is the largest k for which the system is guaranteed deadlock-free?
- A. 3
- B. 2
- C. 4
- D. 7
Correct answer: A. 3
Condition: k(3 − 1) + 1 ≤ 7, so 2k ≤ 6 and k ≤ 3. For k = 4 the processes could hold 2, 2, 2, 1 and all wait.
More Operating Systems questions
- 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…
- 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)…