Process |
Used |
Max |
Need |
P1 |
2 |
7 |
5 |
P2 |
1 |
6 |
5 |
P3 |
2 |
5 |
3 |
P4 |
1 |
4 |
3 |
We have total 9 resources and out of 9, 6 are already allocated to the processes. Now we are left with 3 resource which can fulfill the need of process P3 and P4. Now if we check options A, B and C where first P4 is being served then after completion of P4 we will have total 3 + 1 = 4 resources but now we can't fulfill the need of either P1 or P2, because each needs 5 resource so option A, B and C can not be correct ans. Similarly we can check for option D where after P3 we can fulfill any combination. So Ans- D. <P3,P1,P2,P4><P3,P1,P2,P4><P3,P1,P2,P4>