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.

  1. A.

    Growing, Shrinking

  2. B.

    Shared, Exclusive

  3. C.

    Wait, Wound

  4. 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.

Explore the full course: Hpsc Pgt Computer Science