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

  1. A.

    I only

  2. B.

    II only

  3. C.

    Both I and II

  4. 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.

Explore the full course: Gate Guidance By Sanchit Sir