Example of the banker’s algorithm
nHowever,
if from the initial state, P1 request Q = (1,0,1). The resulting state would be:
Claimed Allocated Available
0 1
1
nWhich
is not a safe state since any process to finish would need an additional unit of
R1.
Request refused: P1 is blocked.
R1 R2
R3
R1 R2
R3
R1 R2
R3