ISRO | ISRO CS 2016 | Question 43
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
Answer: (A)
Explanation: A condition for deadlock can not occur: P(n-1) + 1 <= R
where, P = number of processes ; n = max requirement of each process ; R = Total number of available resources
So, if a system has 3 processes sharing 4 resources and each process needs a maximum of 2 units then:
P = 3, n = 2 and R = 4
=3(2-1) + 1 <= 4, deadlock can never occur.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Please Login to comment...