Multiple choice

A system has 4 processes sharing 5 resources. If each process needs a maximum of 3 units, then

  1. deadlock can never occur

  2. deadlock may occur

  3. deadlock has to occur

  4. None of the above

  5. None of these

Reveal answer Fill a bubble to check yourself
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.