12.28

No effect on deadlock

1

thread 1thread 2
P(s)P(s)
P(t)P(t)
V(s)V(s)
V(t)V(t)
    +
    |
    |
    +                   +--------------------+
V(t)|                   |                    |
    |                   |                    |
    +                   |  unsafe region t   |
    |                   |                    |
    |                   |                    |
    +         +---------+---------+          |
V(s)|         |         |         |          |
    |         |         |         |          |
    +         |         |         |          |
    |         |         |         |          |
    |         |         |         |          |
    +         |         +---------+----------+
P(t)|         |                   |
    |         |  unsafe region s  |
    +         |                   |
    |         |                   |
    |         |                   |
    +         +-------------------+
P(s)|
    |
    +
    |
    |
    +----+----+----+----+----+----+----+----+----+  thread 1
          P(s)      P(t)      V(s)      V(t)

2

thread 1thread 2
P(s)P(s)
P(t)P(t)
V(s)V(t)
V(t)V(s)
    +
    |
    |
    +         +-------------------+
V(s)|         |                   |
    |         |                   |
    +         |                   |
    |         |                   |
    |         |                   |
    +         |         +---------+----------+
V(t)|         |         |         |          |
    |         |         |         | unsafe   |
    +         |         |         | region   |
    |         |         |         |    t     |
    |         |         |         |          |
    +         |         +---------+----------+
P(t)|         |                   |
    |         |                   |
    +         | unsafe region s   |
    |         |                   |
    |         |                   |
    +         +-------------------+
P(s)|
    |
    +
    |
    |
    +----+----+----+----+----+----+----+----+----+  thread 1
          P(s)      P(t)      V(s)      V(t)

3

thread 1thread 2
P(s)P(s)
P(t)P(t)
V(t)V(s)
V(s)V(t)
    +
    |
    |
    +                   +---------+
V(t)|                   | unsafe  |
    |                   | region  |
    +                   |   t     |
    |                   |         |
    |                   |         |
    +         +---------+---------+----------+
V(s)|         |         |         |          |
    |         |         |         |          |
    +         |         |         |          |
    |         |         |         |          |
    |         |         |         |          |
    +         |         +---------+          |
P(t)|         |                              |
    |         |                              |
    +         |    unsafe region s           |
    |         |                              |
    |         |                              |
    +         +------------------------------+
P(s)|
    |
    +
    |
    |
    +----+----+----+----+----+----+----+----+----+  thread 1
          P(s)      P(t)      V(t)      V(s)

4

thread 1thread 2
P(s)P(s)
P(t)P(t)
V(t)V(t)
V(s)V(s)
    +
    |
    |
    +         +------------------------------+
V(s)|         |                              |
    |         |                              |
    +         |                              |
    |         |                              |
    |         |                              |
    +         |         +----------+         |
V(t)|         |         | unsafe   |         |
    |         |         | region   |         |
    +         |         |    t     |         |
    |         |         |          |         |
    |         |         |          |         |
    +         |         +----------+         |
P(t)|         |                              |
    |         |                              |
    +         |    unsafe region s           |
    |         |                              |
    |         |                              |
    +         +------------------------------+
P(s)|
    |
    +
    |
    |
    +----+----+----+----+----+----+----+----+----+  thread 1
          P(s)      P(t)      V(t)      V(s)
comments powered by Disqus