Saturday, October 13, 2012

Two Phase Locking


Two Phase Locking

The most commonly implemented locking mechanism is called
Two Phased Locking or 2PL
2PL is a concurrency control mechanism that ensure serializability.

2PL has two phases : Growing and shrinking.

A transaction acquires locks on data items it will need to complete the transaction.This is called the
growing phase

Once one lock is released, all no other lock may be acquired. This is called the
shrinking phase



The most common way in which access to items is controlled is by “locks.”
Lock manager is the part of a DBMS that records, for each item I, whether one or more transactions are reading or writing any part of I.

No comments:

Post a Comment