|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
n |
Makes use of
previous resource-allocation
|
|
|
matrices and
vectors
|
|
|
n |
Marks each
process not deadlocked. Initially
|
|
|
all processes
are unmarked. Then perform:
|
|
|
|
u |
Mark each process
j for which: A(j,i) = 0 for all
|
|
|
|
resource type i.
(since these are not deadlocked)
|
|
|
|
u |
Initialize work
vector: W(i) = V(i) for all i
|
|
|
|
u |
REPEAT: Find a
unmarked process j such that
|
|
|
|
Q(j,i) <=
W(i) for all i. Stop if such j does not exists.
|
|
|
|
u |
If such j
exists: mark process j and set W(i) = W(i) +
|
|
A(j,i) for all i.
Goto REPEAT
|
|
|
|
u |
At the end: each
unmarked process is deadlocked
|
|