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