Skip to main content

GATE CSE 2024Databases › Transactions, Concurrency Control & IndexingVerified

GATE CSE 2024 PYQ: ​​​​Which of the following statements about the Two Phase Locking ( 2 P L 2 \mathrm{PL} 2 PL ) protocol…

​​​​Which of the following statements about the Two Phase Locking (2PL2 \mathrm{PL}) protocol is/are TRUE?

  1. A
    2PL2 \mathrm{PL} permits only serializable schedules
    Correct answer
  2. B
    With 2PL2 \mathrm{PL}, a transaction always locks the data item being read or written just before every operation and always releases the lock just after the operation
  3. C
    With 2PL2 \mathrm{PL}, once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transaction
    Correct answer
  4. D
    A deadlock is possible with 2PL2 \mathrm{PL}
    Correct answer

Answer

(A, C, D) 2 P L 2 \mathrm{PL} 2 PL permits only serializable schedules; With 2 P L 2 \mathrm{PL} 2 PL , once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transaction; A deadlock is possible with 2 P L 2 \mathrm{PL} 2 PL

Approach

Evaluate each statement against the formal definition of basic Two Phase Locking (2PL): a transaction has a growing phase (acquiring locks) followed by a shrinking phase (releasing locks); no lock may be acquired after any lock is released. Check the serializability guarantee and deadlock behavior.

Statements A, C, and D correctly describe basic 2PL: it guarantees serializability, enforces a growing phase followed by a shrinking phase, and can lead to deadlocks. Statement B instead describes a lock-per-operation strategy, not 2PL.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.