UGC-NET | UGC NET CS 2018 Dec – II | Question 2
Suppose a system has 12 instances of some resources with n processes competing for that resource. Each process may require 4 instances of the resource. The maximum value of n for which the system never enters into deadlock is
Number of resources (R) = 12
Max need for each resource (N) = 3
Since deadlock-free condition is:
R ≥ P(N − 1) + 1
Where R is total number of resources,
P is the number of processes, and
N is the max need for each resource.
12 ≥ P(4 − 1) + 1 11 ≥ 3P 11/3 ≥ P P ≤ 3.66
(Take, floor value for maximum)
Therefore, the largest value of P that will always avoid deadlock is 3.
Option (A) is correct.
Quiz of this Question