Dienstag, August 13, 2013

Coffman conditions for a deadlock

There are four conditions, known as the Coffman conditions, that are necessary for a deadlock to occur.  Remove any one of these, and a deadlock can’t happen:

  1. Mutual exclusion.
    There’s a resource that only one entity can use at a time.
  2. Hold and wait.
    An entity is holding one resource while waiting for another.
  3. No preemption.
    An entity gets to decide when it releases its hold on a resource.
  4. Circular wait.
    There must be a cycle of waits, such that entity 1 is waiting on a resource held by entity 2; entity 2 is waiting on a resource held by entity 3; …; and entity N is waiting on a resource held by entity 1.

von .NET Parallel Programming http://blogs.msdn.com/b/pfxteam/archive/2012/04/12/10293249.aspx 

http://de.wikipedia.org/wiki/Deadlock

Keine Kommentare: