In context of 2-phase locking protocol in DBMS, a transaction issues lock…
2022
In context of 2-phase locking protocol in DBMS, a transaction issues lock requests in ______ phase and unlock requests in ______ phase.
- A.
Growing, Shrinking
- B.
Shared, Exclusive
- C.
Wait, Wound
- D.
Explicit, Implicit
Attempted by 243 students.
Show answer & explanation
Correct answer: A
In the 2-phase locking (2PL) protocol, a transaction is divided into two distinct phases: the growing phase and the shrinking phase. During the growing phase, the transaction can acquire locks but cannot release any. This phase ensures that no new locks are released before all required locks are obtained. In the shrinking phase, the transaction can release locks but cannot acquire any new ones. This phase ensures that no new locks are acquired after any lock has been released. This two-phase structure helps maintain conflict serializability by preventing certain types of conflicts in concurrent transactions.