4 views

1 Answers

In databases and transaction processing, two-phase locking is a concurrency control method that guarantees serializability.It is also the name of the resulting set of database transaction schedules. The protocol uses locks, applied by a transaction to data, which may block other transactions from accessing the same data during the transaction's life.

By the 2PL protocol, locks are applied and removed in two phases:

Two types of locks are used by the basic protocol: Shared and Exclusive locks. Refinements of the basic protocol may use more lock types. Using locks that block processes, 2PL may be subject to deadlocks that result from the mutual blocking of two or more transactions.

4 views

Related Questions