Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 398 Bytes

File metadata and controls

12 lines (7 loc) · 398 Bytes

Bankers Algorithm

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