Which of the following concurrency protocol ensures both conflict…

2014

Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock :

I. 2-phase locking

II. Time phase ordering

  1. A.

    Both I & II

  2. B.

    II only

  3. C.

    I only

  4. D.

    Neither I nor II

Attempted by 116 students.

Show answer & explanation

Correct answer: B

Answer: Time (timestamp) ordering is the protocol that ensures both conflict serializability and freedom from deadlock.

  • Two-phase locking (2PL): Ensures conflict serializability by requiring a growing phase for acquiring locks and a shrinking phase for releasing them. However, it can produce deadlocks because transactions may wait for each other’s locks, possibly creating cyclic waits.

  • Timestamp (time) ordering: Enforces a global order using transaction timestamps. Conflicting operations that would violate the timestamp order are rejected or cause the transaction to restart instead of waiting. Because transactions do not wait for each other, deadlocks cannot occur, and the schedule is conflict-serializable.

Conclusion: Only timestamp (time) ordering satisfies both conflict serializability and freedom from deadlock.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…