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

  1. Mutual exclusion:
    at least one resource must be held in a non-shareable mode. 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:
    a resource can be released only voluntarily by the process holding it.
  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 until 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.



About yingding wang
i am looking forward to innovation in IT and Robotics

Comments are closed.

%d bloggers like this: