Which of the following statements about the Two Phase Locking () protocol is/are TRUE?
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…
- Apermits only serializable schedulesCorrect answer
- BWith , a transaction always locks the data item being read or written just before every operation and always releases the lock just after the operation
- CWith , once a lock is released on any data item inside a transaction, no more locks on any data item can be obtained inside that transactionCorrect answer
- DA deadlock is possible withCorrect 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.