CS FundamentalsModerateGATE CS
n processes share 12 identical units of a resource, and each process may need up to 4 units. What is the largest n for which deadlock is impossible?
- A. 4
- B. 2
- C. 5
- D. 3
Correct answer: D. 3
Deadlock is impossible if n(4 − 1) + 1 ≤ 12, i.e. 3n ≤ 11, n ≤ 3. With n = 4 each could hold 3 units (all 12) and wait forever.
More Operating Systems questions
- 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…
- 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…