|
|
|
|
|
|
|
|
|
|
|
|
|
|
n |
Let Q(j,i) be
the amount of resource type i
|
|
|
requested by
process j.
|
|
|
n |
To determine
if this request should be
|
|
|
granted we
use the banker’s
algorithm:
|
|
|
|
u |
If Q(j,i) <=
N(j,i) for all i then continue. Else
|
|
|
raise error
condition (claim exceeded).
|
|
|
|
u |
If Q(j,i) <=
V(i) for all i then continue. Else wait
|
|
|
(resource not yet
available)
|
|
|
|
u |
Pretend that the
request is granted and
|
|
|
|
determine the new
resource-allocation state:
|
|