Which of the following is/are true:
Which of the following is/are true:
Answer: B. conservative 2PL is conflict serializable and deadlock free — given table of necessary condition for 2 Phase Locking system Key point: All variants of two-phase locking ensure conflict serializability, but only the…
- A.
2PL is conflict serializable and deadlock free
- B.
conservative 2PL is conflict serializable and deadlock free
- C.
rigorous 2PL is conflict serializable and deadlock free
- D.
strict 2PL is conflict serializable and deadlock free
Attempted by 241 students.
Show answer & explanation
Correct answer: B
given table of necessary condition for 2 Phase Locking system
Key point: All variants of two-phase locking ensure conflict serializability, but only the variant that preclaims all locks is deadlock-free.
2PL: Ensures conflict serializability but is not deadlock-free. Locks are requested during execution, so waiting cycles (deadlocks) can occur.
Conservative 2PL: Acquires all required locks before the transaction starts (preclaim). This prevents waiting cycles, so it is deadlock-free, and because it follows 2PL rules it is conflict serializable. Tradeoff: reduced concurrency.
Rigorous 2PL: Holds all locks (shared and exclusive) until commit. This gives conflict serializability, recoverability, and cascadelessness, but it is not deadlock-free because locks are still requested during execution rather than preclaimed.
Strict 2PL: Holds exclusive locks until commit. Ensures conflict serializability and helps with recoverability and preventing cascading aborts, but does not prevent deadlocks.
Conclusion: The only statement that is both conflict serializable and deadlock-free is the one about conservative 2PL, because preclaiming all locks before execution prevents deadlocks while retaining the 2PL serialization guarantees.