Which of the following concurrency control protocols ensure both conflict…
2010
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking
II. Time-stamp ordering
- A.
I only
- B.
II only
- C.
Both I and II
- D.
Neither I nor II
Attempted by 126 students.
Show answer & explanation
Correct answer: B
Key insight: we must check both conflict serializability and whether the protocol can cause deadlocks.
Two-phase locking (2PL): Enforces conflict serializability by acquiring and releasing locks in two phases, but it can produce deadlocks because transactions may block waiting for locks held by others.
Time-stamp ordering: Uses global timestamps to order conflicting operations, which guarantees conflict serializability. It is deadlock-free because transactions do not wait for each other; conflicts are resolved by aborting or rejecting operations based on timestamps.
Conclusion: Only time-stamp ordering satisfies both conflict serializability and freedom from deadlock.