181
The banker’s algorithm
FV(i) = V(i) - Q(j,i) for all i
FA(j,i) = A(j,i) + Q(j,i) for all i
FN(j,i) = N(j,i) - Q(j,i) for all i
uIf the resulting state is safe then allocate resource to process j. Else process j must wait for request Q(j,i) and restore old state.