|< < 32 > >|

Strict Two-Phase Locking

Deadlock

Avoid deadlock

  • Suppose that the objects that can be locked are ranked: x1, ... xn.

  • And suppose that locks are obtained in that order.

  • I.e., if you have locked xi and nothing after it, then:
    • You can request lock xj, j > i.
    • You cannot request lock xj, j < i.

Cycles cannot form, since all waits-for arrows go in the same direction.

|< < 32 > >|