Banker’s Algorithm - Example
5 processes and 3 resource types A (with 10), B (with 5), and C (with 7 instances).
A Snapshot:
Available Allocation Max Need
A B C A B C A B C A B C
3 3 2 P0 0 1 0 7 5 3 7 4 3
P1 2 0 0 3 2 2 1 2 2
P2 3 0 2 9 0 2 6 0 0
P3 2 1 1 2 2 2 0 1 1
P4 0 0 2 4 3 3 4 3 1
<P1, P3, P0, P2, P4> is a safe sequence.
Previous slide
Next slide
Back to first slide
View graphic version