An operating system contains 3 user processes each requiring 2 units of…

1997

An operating system contains 3 user processes each requiring 2 units of resource R. The minimum number of units of R such that no deadlocks will ever arise is

  1. A.

    3

  2. B.

    5

  3. C.

    4

  4. D.

    6

Attempted by 66 students.

Show answer & explanation

Correct answer: C

To prevent deadlock, apply the formula n(k-1)+1. With 3 processes needing 2 units each: 3(2-1)+1 = 4. This ensures at least one process completes, releasing resources for others.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir