Need some clarification on Bankers Algorithm
Posted
by Moonshield
on Stack Overflow
See other posts from Stack Overflow
or by Moonshield
Published on 2010-05-17T23:58:07Z
Indexed on
2010/05/18
0:00 UTC
Read the original article
Hit count: 381
revision
|bankers-algorithm
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
© Stack Overflow or respective owner