8,935 views
11 11 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
17 17 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 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
2 2 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.

Answer:
Position:
Show:

Related questions

8 8 votes
3 answers 3 answers
5.7k
5.7k views
go_editor asked Jul 1, 2016
5,727 views
Which of the following is not an optimization criterion in the design of a CPU scheduling algorithm?Minimum CPU utilizationMaximum throughputMinimum turnaround timeMinimu...
3 3 votes
4 answers 4 answers
7.0k
7.0k views
go_editor asked Jul 1, 2016
6,955 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...
5 5 votes
3 answers 3 answers
6.1k
6.1k views
go_editor asked Jul 1, 2016
6,137 views
A computer has 16 pages of virtual address space but the size of main memory is only four frames. Initially the memory is empty. A program references the virtual pages in...
9 9 votes
4 answers 4 answers
9.0k
9.0k views
Abhi Vs Abhi asked May 18, 2016
8,954 views
Using the page table shown below, translate the physical address 25 to virtual address. The address length is 16 bits and page size is 2048 words while the size of the ph...