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

  1. A.

    Deadlock can never occur

  2. B.

    Deadlock may occur

  3. C.

    Deadlock has to occur

  4. 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.

Explore the full course: Isro