A system has 3 processes sharing 4 resources. If each process needs a maximum…
2016
A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units, then
- A.
Deadlock can never occur
- B.
Deadlock may occur
- C.
Deadlock has to occur
- D.
None of these
Attempted by 188 students.
Show answer & explanation
Correct answer: A
To determine if a deadlock is possible, we use the formula for minimum resources required to guarantee no deadlock: R >= N(M-1) + 1. Here, N = 3 processes, M = 2 maximum resources needed per process, and R = 4 total resources. The minimum resources required to avoid deadlock is 3 * (2 - 1) + 1 = 4. Since the system has exactly 4 resources, it meets the threshold to ensure at least one process can complete and release its resources. Therefore, the system is guaranteed to be deadlock-free.
A video solution is available for this question — log in and enroll to watch it.