Operating Systems CS604 Fall 2006 Assignment 05 Solution
Operating Systems CS604 Fall 2006 Assignment 05 Solution
Need
A B C D
P0 3 0 2 0
P1 0 5 5 0
P2 2 3 0 1
P3 1 1 4 1
P4 2 1 2 0
Available
A B C D
Before 3 2 2 1
After P0 7 2 2 2
After P4 7 5 3 4
After P2 8 5 7 9
After P1 9 6 7 9
After P3 9 10 9 10
This state is not safe. P0 can be satisfied, but the available resources
at that point (7 0 2 2) cannot satisfy the needs of the remaining
processes.
(f) (5 pts) Given the original state (from parts a-d), if a request from
process P4 arrives for additional resources of (0,2,0,0), can the
Banker's algorithm grant the request immediately? Why?