Example of the banker’s algorithm
nThis
state is safe with sequence {P2, P1, P3, P4}. After P2, we have W = (6,2,3)
which enables
the other processes to finish. Hence: request granted.
Claimed Allocated Available
0 1
1
n
nThe
resulting state would be:
R1 R2
R3
R1 R2
R3
R1 R2
R3