$$\overset{\text{Allocation}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{1} & \text{0} & \text{2} \\\hline \text{P1} & \text{0} & \text{3} & \text{1} \\\hline \text{P2} & \text{1} & \text{0} & \text{2} \\\hline \end{array}}\qquad \overset{\text{MAX NEED}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{4} & \text{1} & \text{2} \\\hline \text{P1} & \text{1} & \text{5} & \text{1} \\\hline \text{P2} & \text{1} & \text{2} & \text{3} \\\hline \end{array}}\qquad \overset{\text{Future Need}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{3} & \text{1} & \text{0} \\\hline \text{P1} & \text{1} & \text{2} & \text{0} \\\hline \text{P2} & \text{0} & \text{2} & \text{1} \\\hline \end{array}}$$
Available $=(2\quad 2 \quad0)$
$P1(1\quad 2\quad 0)$'s needs can be met. P1 executes and completes releases its allocated resources.
$A=(2\quad 2\quad 0)+(0\quad 3\quad 1)=(2 \quad5\quad 1)$
Further $P2 (0\quad 2\quad 1)$ s needs can be met.
$A=(2\quad 5\quad 1)+(1\quad 0\quad 2)=(3\quad 5\quad 3)$
next $P0$ s needs can be met.
Thus safe sequence exists $P1 P2 P0.$
Next Request $P0(0 1 0)$
$$\overset{\text{Allocation}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{1} & \text{0+1=1} & \text{2} \\\hline \text{P1} & \text{0} & \text{3} & \text{1} \\\hline \text{P2} & \text{1} & \text{0} & \text{2} \\\hline \end{array}} \qquad \overset{\text{MAX NEED}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{4} & \text{1} & \text{2} \\\hline \text{P1} & \text{1} & \text{5} & \text{1} \\\hline \text{P2} & \text{1} & \text{2} & \text{3} \\\hline \end{array}}\qquad \overset{\text{Future Need}}{\begin{array}{|l|l|l|l|}\hline \text{} & \text{R0} & \text{R1} & \text{R2} \\ \hline \text{P0} & \text{3} & \text{0} & \text{0} \\\hline \text{P1} & \text{1} & \text{2} & \text{0} \\\hline \text{P2} & \text{0} & \text{2} & \text{1} \\\hline \end{array}}$$
Available $=(2\quad 2-1=1\quad 0)$
Here, also not a single request need by any process can be made.
- System is in safe state.
- Since request of $P0$ can not be met,system would delay the request and wait till resources are available.