in Operating System recategorized by
4,889 views
4 votes
4 votes

Consider a system having $m$ resources of the same type. These resources are shared by $3$ processes $A, B, C,$ which have peak time demands of $3, 4, 6$ respectively. The minimum value of $m$ that ensures that deadlock will never occur is:

  1. $11$
  2. $12$
  3. $13$
  4. $14$
in Operating System recategorized by
by
4.9k views

2 Comments

option A is correct m=11.
1
1
11 is answer
0
0

5 Answers

7 votes
7 votes
Best answer

The sufficient condition for ensuring that deadlock doesn't occur:

                                  Si <n+m

where Si = Total request resource of ith process

         n = Total number of process

        m = Total number of resource

if above condition is false then DL may occur, if the condition is true then-No DL.

for the above problem, total demand is: 3+4+6=13

13<3+m

10<m, the minimum value of m that ensure deadlock is never occurring is 11.

selected by
7 votes
7 votes

option a

1 comment

This is the right and easiest technique.
1
1
3 votes
3 votes
Option A is correct.

Maximum requirement of A, B and C are 3, 4 and 6 instances of a resource, respectively. Minimum instances of the resource required without creating a deadlock:

(3-1)+(4-1)+(6-1) + 1 = 11. The last one added is shared among all three.
2 votes
2 votes
Option A, minimum value of m=11 that ensures deadlock will never occur.

So we have three process A, B and C and the peak demands is 3, 4 and 6 respectively, if we allocate A=2 , B=3 and C=5 so with 10 resources there is deadlock but if we allocate one more so deadlock will never occur.
Answer:

Related questions