182
Example of the banker’s algorithm
nWe have 3 resources types with amount:
uR(1) = 9, R(2) = 3, R(3) = 6
nand have 4 processes with initial state:
            Claimed                Allocated               Available
3     2     2
6     1     3
3     1     4
4     2     2
1     0     0
5    1     1
2     1     1
0     0     2
1     1     2
P1
P2
P3
P4
nSuppose that P2 is requesting Q = (1,0,1). Should this request be granted?
R1  R2  R3
R1  R2  R3
R1  R2  R3