What is two phase locking ?
Two-phase locking or 2PL is a locking system, inwhich transactions are divided into two distinct phases. During the first phase, the transaction only acquires locks and transaction may not release locks. This phase is called Growing Phase. During the second phase, the transaction only releases locks and transaction may not obtain locks (Shrinking Phase). More formally, once a transaction releases a lock, it may not acquire any additional locks. Practically, this translates into a system in which locks are acquired as they are needed throughout a transaction and retained until the transaction ends, either by committing or aborting.
0 Comments
Please add nice comments or answer ....