AlgoPlus//structures / bankers
Read the theory

Banker's Algorithm

Deadlock avoidance: only grant a request if a safe sequence still exists.

Finished
0/5
Available
State
checking
Available resources (A, B, C)
Legend
Process under check
Finished
Unsafe
AI Tutor Workspace
In a nutshell
Like a careful banker who lends cash only if every customer could still be paid off in some order, the operating system hands out resources only when it can prove everyone could still finish. Each program declares the most it will ever need up front; a request is granted only if a 'safe sequence' to finish all programs still exists. That foresight prevents deadlock before it can happen, rather than cleaning it up afterward.
Ready
Press play to begin the cinematic walkthrough.
The banker only lends if it can still satisfy everyone eventually. By granting a request only when a safe sequence still exists, the system never steps into a state from which deadlock is unavoidable — avoidance, not detection.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Banker's Algorithm.