Open In App

GATE | GATE CS 2010 | Question 20

Like Article
Like
Save
Share
Report

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


Answer: (B)

Explanation:

2 Phase Locking (2PL) is a concurrency control method that guarantees serializability. The protocol utilizes locks, applied by a transaction to data, which may block (interpreted as signals to stop) other transactions from accessing the same data during the transaction’s life. 2PL may be lead to deadlocks that result from the mutual blocking of two or more transactions. See the following situation, neither T3 nor T4 can make progress.
\"\"
Timestamp-based concurrency control algorithm is a non-lock concurrency control method. In Timestamp based method, deadlock cannot occur as no transaction ever waits.


Quiz of this Question
Please comment below if you find anything wrong in the above post


Last Updated : 09 Oct, 2019
Like Article
Save Article
Share your thoughts in the comments
Similar Reads