6,475 views
9 votes
9 votes

What is the minimum number of resources required to ensure that deadlock will never occur, if there are currently three processes $P_1, P_2$ and $P_3$ running in a system whose maximum demand for the resources of same type are 3, 4, and 5 respectively.

  1. 3
  2. 7
  3. 9
  4. 10

3 Answers

Best answer
15 votes
15 votes
consider the worst case all processes holding just one resource less than their completion(max need)

P1=2

P2=3

P3=4

TOTAL RESOURCE =9  now one more resource will ensure that any one of these process will execute and release all its resources

hence 9+1=10 resources will ensure there will not be deadlock hence ans is D
selected by
3 votes
3 votes

Option D will right option for it.

We have processes like P1,P2 and P3 now assign each one of them 2,3 and 4 units.This is condition for deadlock if we assign one more unit to any one of the processes then deadlock will be broken .Therefore minimum resourses required is 10.

3 votes
3 votes
Short trick for these kind of questions-

subtract 1 from "all" max demands,like

3-1 = 2

4-1= 3

5-1 = 4

add all of them = 2+3+4 = 9

then add 1 to it 9+1 =10 so answer is D
Answer:

Related questions

8 votes
8 votes
3 answers
1
go_editor asked Jul 1, 2016
4,647 views
Which of the following is not an optimization criterion in the design of a CPU scheduling algorithm?Minimum CPU utilizationMaximum throughputMinimum turnaround timeMinimu...
4 votes
4 votes
4 answers
2
go_editor asked Jul 1, 2016
5,595 views
Dirty bit is used to indicate which of the following?A page fault has occurredA page has corrupted dataA page has been modified after being loaded into cacheAn illegal ac...
4 votes
4 votes
3 answers
3
7 votes
7 votes
3 answers
4