Consider a system having m resources of the same type. These resources are…
1993
Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C, which have peak demands of 3, 4 and 6 respectively. For what value of m deadlock will not occur?
- A.
7
- B.
9
- C.
10
- D.
13
- E.
15
Attempted by 57 students.
Show answer & explanation
Correct answer: D
For single resource type with multiple processes, the condition to guarantee no deadlock is:
Given:
* Process A peak demand = 3
* Process B peak demand = 4
* Process C peak demand = 6
Worst case: each process holds one less than its maximum:
* A holds 2
* B holds 3
* C holds 5
Total = 10
If there is 1 extra resource (making total 11), one process can complete, release resources, and deadlock is avoided.
So deadlock will not occur when (m >= 11).
A video solution is available for this question — log in and enroll to watch it.