CS FundamentalsHardProduct-company MCQ pattern

Strict two-phase locking (Strict 2PL) differs from basic 2PL in which way?

  1. A. It allows locks to be released at any point, like basic 2PL
  2. B. It holds ALL exclusive (write) locks until the transaction commits or aborts, eliminating cascading rollback (a transaction never reads data written by another transaction that might still abort)
  3. C. It removes the growing phase entirely
  4. D. It only applies to read locks, not write locks

Correct answer: B. It holds ALL exclusive (write) locks until the transaction commits or aborts, eliminating cascading rollback (a transaction never reads data written by another transaction that might still abort)

Basic 2PL guarantees conflict-serializability but still allows a transaction to release a write lock before committing, which can let another transaction read that (possibly-to-be-rolled-back) data and cascade the rollback. Strict 2PL holds exclusive locks until commit/abort, so nothing uncommitted is ever visible for others to build on, eliminating cascading rollbacks.

More DBMS and SQL questions

Exams that ask this topic