The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+15 votes

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?

- $7$
- $9$
- $10$
- $13$
- $15$

+28 votes

Best answer

**$\mathbf{13 \text{ and } 15.}$**

Consider the worst scenario: all processes require one more instance of the resource. So, $P1$ would have got $2$, $P2 - 3$ and $P3 - 5$. Now, if one more resource is available at least one of the processes could be finished and all resources allotted to it will be free which will lead to other processes also getting freed. So, $2 + 3 + 5 = 10$ would be the maximum value of m so that a deadlock can occur.

+11 votes

Worst case

3-1 =2

4-1=3

6-1=5

10 then may be deadlock but we don't want deadlock so we required minimum 11 resources

So ans is any number $\geq$ 11

3-1 =2

4-1=3

6-1=5

10 then may be deadlock but we don't want deadlock so we required minimum 11 resources

So ans is any number $\geq$ 11

+9 votes

We have m resourses now suppose we have three process like below

P1,P2 and P3

P1=2

P2=3

P3=5

Max resourses by which deadlock happen=10

**So minimum resourses by which deadlock didn't happen =10+1>=11 therefore answer 13 according to option.**

- All categories
- General Aptitude 1.6k
- Engineering Mathematics 7.5k
- Digital Logic 3k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 5.9k
- Compiler Design 2.1k
- Databases 4.2k
- CO & Architecture 3.5k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 588
- Exam Queries 568
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,071 questions

53,206 answers

184,562 comments

70,425 users