edited by
1,973 views
3 3 votes

Consider the following resources allocation graph with four processes $P_{1}, P_{2}, P_{3}, P_{4}$ and three resources $R_{1}, R_{2}, R_{3}$. System has two instances of resources $R_{1}$, two instances of resources $R_{2}$ and two instances of resources $R_{3}$.

Which of the following statement is correct for the above system?

  1. No safe sequence exist.
  2. More than one safe sequence exists.
  3. Exactly one safe sequence exists.
  4. More than two safe sequence exists.

4 Answers

3 3 votes

After P3 more than one option possible as P2,P1,P4 all can be satisfied so many combinations possible hence the answer. Hope it helps!

0 0 votes
D) more than 2 safe sequence.

First P3 shall complete and then other 3 processes in any order.

safe sequences:

(P3 P1 P2 P4), (P3 P1 P4 P2)

(P3 P2 P4 P1), (P3 P2 P1 P4)

(P3 P4 P2 P1), (P3 P4 P1, P2)
0 0 votes
(D)More than 2 safe sequences exist.

Explanation: After creating the Request and allocated table from the request allocated graph given above we can see R1, R2 and R3 are left with only 0,1 and 0 resources respectively. With this, we only can satisfy the need for P3. After P3 executes it releases 1 instance of R2 and one instance of R3 making the available resources of R1, R2, and R3 as 0,2 and 1 respectively. With this, we can satisfy the requirement of all the processes so we can schedule any one of them so there will be more than two safe sequences possible.
Position:
Show:

Related questions

2 2 votes
2 2 answers
1.6k
1.6k views
hacker16 asked Nov 11, 2017
1,600 views
System with 100 process and single resource R with 100 instances. Each process needs a minimum of one instances to complete.Deadlock is possibleStarvation is possibleThra...
0 0 votes
1 answers 1 answer
4.4k
4.4k views
Lakshman Bhaiya asked Dec 22, 2018
4,424 views
Consider a system which has $28$ instances of a resource $P$ such that $4+n$ processes share them,$4$ process request $5$ instances of $'P'.$ If $n$ process request $5$ i...
0 0 votes
1 1 answer
1.7k
1.7k views
Gupta731 asked Nov 27, 2018
1,718 views
Consider two processes P1 and P2, each needed 3 resources 1, 2 and 3 in a database. If each processes ask them in any order, then the number of ways possible in which sys...
0 0 votes
1 answers 1 answer
2.1k
2.1k views
Satbir asked Nov 1, 2018
2,148 views
A system has 28 instances of resource P such that 4+n processes share them, 4 process request 5 instances of P. If n processes request 5 instances of same resource what i...