a.
Need
A B C D
P0 0 0 0 0
P1 0 7 5 0
P2 1 0 0 2
P3 0 0 2 0
P4 0 6 4 2
b.
Yes. The sequence satisfies the safety criteria.
c.
We pretend that that this request has been fulfilled, and we arrive at the following new state:
Allocation Need Available
A B C D A B C D A B C D
P0 0 0 1 2 0 0 0 0 1 1 0 0
P1 1 4 2 0 0 7 5 0
P2 1 3 5 4 1 0 0 2
P3 0