CS FundamentalsHardGATE CS

Which locking scheme guarantees BOTH freedom from deadlock and schedules without cascading rollback?

  1. A. Strict 2PL alone, holding exclusive locks until commit
  2. B. Conservative 2PL alone, taking all locks before starting
  3. C. Basic 2PL with lock upgrades from shared to exclusive
  4. D. Conservative 2PL that also holds exclusive locks until commit

Correct answer: D. Conservative 2PL that also holds exclusive locks until commit

Conservative 2PL acquires every lock before starting, so no transaction waits while holding locks (no deadlock), but it may release X locks early. Strict 2PL holds X locks to commit (cascadeless) but can deadlock. Combining both gives both guarantees.

More DBMS and SQL questions

Exams that ask this topic