Banker’s Algorithm for deadlock avoidance.
A system with five processes P0 through P4 and three resources of type A, B, C. Resource type A has 10 instances, B has 5 instances and type C has 7 instances.
Implement the Banker’s algorithm to answer the following question:
Is the system in a safe state? Yes
Then what is the safe sequence? P1 -> P3 -> P4 -> P0 -> P2