Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 8: Deadlocks - Coggle Diagram
Chapter 8: Deadlocks
Deadlock Detection
Detection algorithm
Recovery scheme
Allow system to enter deadlock state
Single Instance of Each Resource Type
Maintain wait-for graph
Nodes are processes
Pi ==> Pj. if Pi is waiting for Pj
Periodically invoke an algorithm that searches for a cycle in the graph. If there is a cycle, there exists a deadlock
An algorithm to detect a cycle in a graph requires an order of n2 operations, where n is the number of vertices in the graph
Several Instances of a Resource Type
Allocation:
An n x m matrix defines the number of resources of each
type currently allocated to each process
Request:
An n x m matrix indicates the current request of each process. If Request [i][j] = k, then process Pi is requesting k more instances of resource type Rj
Available:
A vector of length m indicates the number of available
resources of each type
Resource-Allocation Graph and Wait-for Graph