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
(A) 3
(B) 4
(C) 5
(D) 6


Answer: (A)

Explanation: Given,
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

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.