Need some clarification on Bankers Algorithm
- by Moonshield
Hi, just a quick query about safe/unsafe states in Dijkstra's Banker's algorithm...
If one of the processes in the snapshot of the system (for example the one below) already has all of its needs fulfilled and there are not sufficient resources available to fulfil the needs of any of the other processes, is the system in a safe state? I know normally we assume that once a process receives its required resources it will terminate soon after and return all resources, but is this assumption factored in when we calculate the state of the system?
Allocated Maximum Available
| A | B | A | B A | B
---+---+--- ---+---+--- ---+---
P1 | 1 | 2 P1 | 1 | 2 1 | 3
P2 | 5 | 3 P2 | 7 | 8