1,828 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 , identify which of the following values of X and Y the above system will be in safe state?

1. X = 40 , Y = 20

2. X = 50 , Y = 10

3. X = 30 , Y = 20

4. X = 20 , Y = 30

2 Answers

3 votes
3 votes

D is the answer ..

WE have total of 150 resources ..out of which 40 and 45 means total of 85 are allocated to space P1 and P2 .

Now remaining resources are 150-85=65.

Now say we allocate 20 resources to P3 so required for P3 are 40 

we will allocate 30 resoures to P4 so we need 10 for its execution ....

so table will be 

Process Max Allocated Needed
P1 70 45 25
P2 60 40 20
P3 60 20 40
P4 40 30 10

Still remaining resources are 150-(45+40+20+30)=150-(85+50)=15 

So with 15 resourecs in hand we can give it to P4 ..

Once P4 done we have 40 Resources in hand we can easily satisfy the need of other Process So 

D is the Correct Option.

Related questions

2 votes
2 votes
2 answers
1
Sunnidhya Roy asked Dec 30, 2022
689 views
Can Safe state in DeadLock Avoidance Mechanism always guarantee No DeadLock??
0 votes
0 votes
1 answer
2
0 votes
0 votes
3 answers
4
Vegeta asked Oct 22, 2018
923 views
All safe states are deadlock free. But we can go to deadlock with some combination of sequence? So if the question is, from the safe state can we enter deadlock? Ans shou...