Deadlock - Necessary and Sufficient Condition

Necessary and Sufficient Condition

A deadlock situation can arise if and only if all of the following conditions hold simultaneously in a system:

  1. Mutual Exclusion: At least one resource must be non-shareable. Only one process can use the resource at any given instant of time.
  2. Hold and Wait or Resource Holding: A process is currently holding at least one resource and requesting additional resources which are being held by other processes.
  3. No Preemption: The operating system must not de-allocate resources once they have been allocated; they must be released by the holding process voluntarily.
  4. Circular Wait: A process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of waiting processes, P = {P1, P2, ..., PN}, such that P1 is waiting for a resource held by P2, P2 is waiting for a resource held by P3 and so on till PN is waiting for a resource held by P1.

These four conditions are known as the Coffman conditions from their first description in a 1971 article by Edward G. Coffman, Jr. Unfulfillment of any of these conditions is enough to preclude a deadlock from occurring.

Read more about this topic:  Deadlock

Famous quotes containing the words sufficient and/or condition:

    Pleasure is the rock which most young people split upon; they launch out with crowded sails in quest of it, but without a compass to direct their course, or reason sufficient to steer the vessel; for want of which, pain and shame, instead of pleasure, are the returns of their voyage.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    The difference between tragedy and comedy is the difference between experience and intuition. In the experience we strive against every condition of our animal life: against death, against the frustration of ambition, against the instability of human love. In the intuition we trust the arduous eccentricities we’re born to, and see the oddness of a creature who has never got acclimatized to being created.
    Christopher Fry (b. 1907)