Deadlock detection
If the system does not employ either a deadlock prevention or avoidance algorithm deadlock, the deadlock situation may occur. In this environment, the system must provide:
* An algorithm that examines the state of the system to determine whether there has been a deadlock.
* An algorithm to recover from deadlock.
If all resources have only one event, then we can define a deadlock detection algorithm which uses a variant of the resource allocation graph, called wait-for graph.
As before, there is a deadlock in the system if and only if the wait-for graph contains a cycle. To detect deadlocks, the system needs to keep the wait-for graph and periodically call the algorithm that finds cycles in the graph. Algorithm to detect cycles in the graph are used to sequence operations n1, where n is the number of vertices in the graph
If the system does not employ either a deadlock prevention or avoidance algorithm deadlock, the deadlock situation may occur. In this environment, the system must provide:
* An algorithm that examines the state of the system to determine whether there has been a deadlock.
* An algorithm to recover from deadlock.
If all resources have only one event, then we can define a deadlock detection algorithm which uses a variant of the resource allocation graph, called wait-for graph.
As before, there is a deadlock in the system if and only if the wait-for graph contains a cycle. To detect deadlocks, the system needs to keep the wait-for graph and periodically call the algorithm that finds cycles in the graph. Algorithm to detect cycles in the graph are used to sequence operations n1, where n is the number of vertices in the graph