Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
2PL permits only serializable schedules
With 2PL, a transaction always locks the data item being read or written just before every operation and always releases the lock just after the operation
With 2PL, 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: (A) 2PL permits only serializable schedules; (C) With 2PL, 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; (D) A deadlock is possible with 2PL
Explanation
2PL guarantees conflict serializability, has a growing then shrinking phase (no new locks after first release), and can deadlock. Releasing right after each operation would violate 2PL.
More Transactions and Concurrency Control questions
GATE 2022 CS Q39– Let R i(z) and W i(z) denote read and write operations on a data element z by a…
GATE 2021 CS (CS1) Q23– Suppose a database system crashes again while recovering from a previous crash. Assume…
GATE 2021 CS (CS1) Q42– Let r i(z) and w i(z) denote read and write operations respectively on a data item z by a…
GATE 2020 CS Q47– Consider a schedule of transactions T 1 and T 2. In time order (RX = Read(X), WX =…
GATE 2019 CS Q21– Consider the following two statements about database transaction schedules: I. Strict…
GATE 2016 CS (CS1) Q32– Which one of the following is NOT a part of the ACID properties of database transactions?