Rigorous two-phase locking

From Wikipedia, the free encyclopedia

In computer science, rigorous two-phase locking (Rigorous 2PL) is a locking method used in concurrent systems.

The two rules of Rigorous 2PL are:

  1. If a transaction T wants to read/write an object, it must request a shared/exclusive lock on the object.
  2. All locks (both exclusive and shared) held by transaction T are released when T commits (and not before).

Under rigorous 2PL, transactions can be serialized by the order in which they commit. Rigorous 2PL is like strict 2PL, with the additional constraint that all locks (shared and exclusive) must be held until a transaction commits.

Most database systems use strict 2PL.