393 views
1 votes
1 votes
process maximum demand currently holds
p1 70 45
p2 60 40
p3 60 x
p4 40 y

if a system has total of 150 units of resource then identify which of the following values of X and Y the above system will be in sage state?

A x=40,Y=20

B X=30 ,Y =20

C X=50 Y=10

D X=20 Y=30

2 Answers

Best answer
0 votes
0 votes

Answer : - D

Explanation:-

We will go through options:-

a) x = 40, y = 20  

Process Max Alloc Need
p1 70 45 25
p2 60 40 20
p3 60 40 20
p4 40 20 20

Available = 5

We can't satisfy none process need.

b) x = 30, y = 20  

Process Max Alloc Need
p1 70 45 25
p2 60 40 20
p3 60 30 30
p4 40 20 20

Available = 15

We can't satisfy none process need.

c) x = 50, y = 10  

Process Max Alloc Need
p1 70 45 25
p2 60 40 20
p3 60 50 10
p4 40 10 30

Available = 5

We can't satisfy none process need.

d) x = 20, y = 30  

Process Max Alloc Need
p1 70 45 25
p2 60 40 20
p3 60 20 40
p4 40 30 10

Available = 15

We can satisfy the need of p4 first and after that we have total available = 45, thus we can satisfy remaining need of p1, p2, p3 in any sequence,

Thus we have total 6 safe sequence.

Hence the answer is d) x = 20, y = 30  

selected by
0 votes
0 votes
  allocated max need
p1 45 70 25
p2 40 60 20
p3 X 60 60-X
p4 Y 40 40-Y


OPtion 1  - X=40 and Y=20

Consider the options one by one

required = max - currently holds (i.e) 60-x and 40-y

if  X and Y is substituted as 40 and 20 in allocated 

then total allocated resources is 45 + 40 + 40 + 20 = 145

total resources = 150 (given )

so now remaining = 150 - 145 =5

Look at the need column with 5 resources no process can be satisfied

therefore not option 1

Similarly try for all other options

ANS - option D X=20 and Y=30

Related questions