In: Computer Science
10. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
(I) 2-phase locking
(II) Time-stamp ordering
(a) < some combination of (I) and (II) >
(b) < some combination of (I) and (II) >
(c) < some combination of (I) and (II) >
(d) Neither (I) nor (II)
out of the two concurrency control protocols (II) TIME-STAMP ORDERING ensures both conflict and serializability and freedom from deadlock.
Explanation of the two:-
TWO-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.
TIME-STAMP ORDERING is algorithm is a non-lock concurrency control method. In Timestamp based method, deadlock cannot occur as no transaction ever waits.
So clearly the answer is only no. (II) TIME STAMP ORDERING.
KINDLY PUT A THUMPS UP.THANK U VERY MUCH.