Deadlock

Here are some rules for possibly detecting deadlocks using the resource-allocation graph:

  1. Case 1: If the graph has no cycles, then there is no deadlock.
  2. Case 2: Otherwise, if the graph has a cycle AND there is one resource instance (dot) in each of the resource categories in the cycle, then there is at least one deadlock.
  3. Case 3: Otherwise, if there is a cycle, but at least one category contains 2 or more resource instances, there may or may not be a deadlock. To tell exactly, we must look at the particular situation to see if it will result in a deadlock.