A system has 4 processes sharing 5 resources. If each process needs a maximum of 3 units, then
-
deadlock can never occur
-
deadlock may occur
-
deadlock has to occur
-
None of the above
-
None of these
C
Correct answer
Explanation
Deadlock has to occur as there are 4 processes and 5 resources. Also each process needs 3 resource to complete. So if initially all the process has 1 resource each we will be left with only 1 resource, if this resource is acquired by any one of the process it will still not complete the task as total requirement is of 3 resources. As a result deadlock has to occur.