3,171 views
2 2 votes

Banker algorithm is used by OS to avoid the deadlock. Following table shows the current allocation and maximum demand by process $P_{1}$,$P_{2}$,$P_{3}$ and $P_{4}$ for the instances $A,B,C$

    Process Max Demand (A,B,C) Current Allocation(A,B,C)
$P_{1}$              $8,2,3$              $3,1,0$
$P_{2}$              $4,8,5$              $3,8,4$
$P_{3}$              $9,7,1$              $9,6,0$
$P_{4}$              $7,0,4$              $0,0,4$

 

There are still $2,1,2$ instances of $A,B$ and $C$ are available respectively. Following processes made by process in the sequence.

Req1: $P_{1}$ requests $1,1,1$ of $A,B,C$ respectively

Req2: $P_{4}$ requests $1,0,1$ of $A,B,C$ respectively

Which of these two requests will be granted?

 

1 Answer

Best answer
2 2 votes
  • If p1 is request then safe sequence is possible so, request of p1 is granted. But in case of p4 safe sequence is not possible so, request of p4 is not granted.

 

 

 

• selected by
Position:
Show:

Related questions

5 5 votes
1 1 answer
125
125 views
GO Classes asked Aug 20
125 views
A system contains:$12$ units of resource $R$$24$ units of resource $S$It is managed using Banker's Algorithm.Maximum claims:$P_1:(0,12)$$P_2:(8,15)$$P_3:(8,20)$Current al...
14 14 votes
2 2 answers
2.8k
2.8k views
gatecse asked Feb 23
2,752 views
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?Banker's algorithm is used to prevent deadlocksDeadlock formation can be ...
1 1 vote
2 2 answers
1.1k
1.1k views
GO Classes asked Feb 12
1,057 views
With respect to deadlocks in an operating system, which of the following statements is/are false?An assignment edge in a resource allocation graph is marked from a proces...