Practice mode Operating Systems

Which graph does deadlock detection use when every resource has a single instance?

Correct answer C. A wait-for graph obtained by removing resource nodes from the resource-allocation graph

Explanation

For single-instance resources, the detector collapses the resource-allocation graph into a wait-for graph, with an edge from Pi to Pj when Pi waits for a resource that Pj holds. The system is deadlocked exactly when this graph contains a cycle, which can be checked periodically. Multiple-instance resources need a Banker-like detection algorithm instead.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.