Banker's algorithm deadlock


The Banker's algorithm is a resource allocation and deadlock avoidance algorithm developed by Edsger Dijkstra that tests for safety by simulating the allocation of predetermined maximum possible amounts of all resources, and then makes an "s-state" check to test for possible deadlock conditions for all other pending activities, before deciding whether allocation should be allowed to continue.

Example & Simulation

Try It yourself

Allocation Matrix

Process A B C

Max Matrix

Process A B C

Need Matrix = Max Matrix - Allocation Matrix

Process A B C

Available Matrix = Available Matrix + Allocation Matrix