Avoiding Deadlock: Resource Trajectories

  1. Two nonsharable resources and two processes.

  2. Horizontal Axis: Number of instructions executed by process P1.

  3. Vertical Axis: Number of instructions executed by process P2.

  4. Shaded regions represent impossible situations: both P1 and P2 having a nonsharable resource.

  1. P1 scheduled: goes from p to q,

  2. P2 scheduled: goes from q to r,

  3. P1 scheduled: goes from r to s,

  4. P2 scheduled: goes from s to t.

Figure based on one appearing on page 177 of Operating Systems: Design and Implementation, 2nd Edition by Andrew S. Tanenbaum and Albert S. Woodhull, Prentice Hall, 1997.