Question: A common algorithm for detecting deadlocks ( DEADLOCK - DETECT ) is the following: 1 . Mark each process that has a row in the
A common algorithm for detecting deadlocks DEADLOCKDETECT is the following:
Mark each process that has a row in the Allocation matrix A of all zeros.
Initialize a temporary vector W to equal the Available vector V
Find an index i such that process i is currently unmarked and the i
th row of Q is less than or equal to W That is Qij
Wj for j m
i If no such row is found, terminate the algorithm.
ii If such a row is found, mark process i and add the corresponding row of the allocation matrix to W That is set
Wj Wj Aij, for j m
Return to step
A deadlock exists if and only if there are unmarked processes at the end of the algorithm.
Given the following resource matrices, where Rj refers to a resource and m is the number of resources
in this problem j m; and Pi refers to a process and n is the number of processes in this
problem i n:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
