Total resources: X: 2 Y: 6 Z: 13
total allocated to given process: X: 2 Y: 5 Z: 9
$\therefore$ remaining resoureces: X: 2 Y: 1 Z: 4
Need table for processes
|
X |
Y |
Z |
$P_0$ |
3 |
1 |
1 |
$P_1$ |
1 |
1 |
2 |
$P_2$ |
3 |
4 |
0 |
$P_3$ |
3 |
3 |
12 |
so we can only provide resources to process $P_1$
after $P_1$ resources will be: X: 3 Y: 1 Z: 6
after $P_0$ resources will be: X: 3 Y: 4 Z: 10
after $P_2$ resources will be: X: 3 Y: 2 Z: 12
and at last $P_1$ will execute
$\therefore$ $P_2$ is the process which will execute second last