CS FundamentalsHardGATE CS · DBMS
How many of these statements about two-phase locking are correct? 1. Basic 2PL guarantees conflict serializability. 2. Basic 2PL prevents deadlocks. 3. Strict 2PL avoids cascading rollbacks. 4. Conservative (static) 2PL is deadlock-free. 5. Under rigorous 2PL, transactions can be serialized in their commit order.
- A. 2
- B. 5
- C. 3
- D. 4
Correct answer: D. 4
All except statement 2 are true. 2PL itself does not prevent deadlocks — two transactions can each hold a lock the other wants. Conservative 2PL avoids deadlock by taking all locks up front.
More DBMS and SQL questions
- Table Route(src, dst, cost) rows: ('A', 'B', 5), ('B', 'C', 4), ('A', 'C', 12), ('C', 'D', 3), ('B', 'D', 9), ('D', 'A', 2). What does…
- A file of 1000 blocks is sorted by external merge sort with M = 11 buffer blocks (sorted runs of M blocks are created in pass 0, then (M −…
- The system crashes after the last record of this log (immediate database modification; <Ti, X> denotes an update with old and new values…
- T1 has 3 operations, T2 has 2 and T3 has 2. How many concurrent schedules (interleavings that keep each transaction's own order) exist…
- A query must list departments whose average salary exceeds 50000, considering only employees hired after 2020. Which clause placement is…
- Table Staff(id, name, dept, pay, boss) rows: (1, 'Anu', 'Ops', 40, NULL), (2, 'Bala', 'Ops', 55, 1), (3, 'Chitra', 'Tech', 70, 1), (4…