Consider a system having ‘m’ resources of the same type. These resources are…

2016

Consider a system having ‘m’ resources of the same type. These resources are shared by three processes P1 , P2 and P3 which have peak demands of 2, 5 and 7 resources respectively. For what value of ‘m’ deadlock will not occur ?

  1. A.

    70

  2. B.

    14

  3. C.

    13

  4. D.

    7

Attempted by 259 students.

Show answer & explanation

Correct answer: C

Key insight: to guarantee that deadlock cannot occur with identical resources, ensure the total number of resources m is greater than the sum of (peak demand − 1) for all processes. Equivalently, m must be at least (sum of peak demands) − (number of processes − 1).

  • Compute the sum of peak demands: 2 + 5 + 7 = 14.

  • Number of processes: 3.

  • Apply the formula: minimal m = (sum of peak demands) − (number of processes − 1) = 14 − (3 − 1) = 14 − 2 = 12.

  • Conclusion: deadlock will not occur for any m ≥ 12. The minimal value that guarantees no deadlock is 12.

  • Check the provided choices: 7 is insufficient (deadlock can occur). Values 13, 14, and 70 are all sufficient but not minimal. None of the given options equals the correct minimal value 12.

Therefore the correct minimal m for which deadlock will not occur is 12; the provided answer marking 70 as correct is not accurate as a minimal answer.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor