Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?
Answer
(A), (C), (D)
Explanation
Under 2PL each transaction has a growing phase, in which it may only acquire locks, followed by a shrinking phase, in which it may only release them.
- A is true. Every schedule that 2PL allows is conflict serializable, equivalent to running the transactions one after another in the order of their lock points.
- B is false. Releasing a lock right after each operation and then locking the next item mixes the two phases, which is exactly what 2PL forbids.
- C is true. This is the shrinking phase: after the first release, no new lock may be taken.
- D is true. If T1 holds a lock on X and waits for Y while T2 holds Y and waits for X, both wait forever; basic 2PL does nothing to prevent this.
Answer: A, C, D