5,031 views
5 votes
5 votes

Which of the following concurrency control protocol ensures both conflict and free from deadlock? ,

  1. Time stamp ordering
  2. 2 Phase locking
  3. Both (a) and (b)
  4. None of the above

3 Answers

Best answer
12 votes
12 votes
A

time stamp and 2PL both ensure CS, but only timestamp is deadlock free
selected by
2 votes
2 votes
Option A

Timestamp based Protocol ensures freedom from Deadlock as no transaction ever waits, trans'ns are simply rolled back and started afresh with new Timestamp.
0 votes
0 votes

Answer is A

2-PL has three versions only one of them is deadlock free i.e. Conservative 2-PL. But it is not in practice.

From geeksforgeeks,


Conservative 2-PL is Deadlock free and but it does not ensure Strict schedule(More about this here!). However, it is difficult to use in practice because of need to predeclare the read-set and the write-set which is not possible in many situations. In practice, the most popular variation of 2-PL is Strict 2-PL.

However, Timestamp Ordering is Deadlock free because ,

Whenever the Basic TO algorithm detects twp conflicting operation that occur in incorrect order, it rejects the later of the two operation by aborting the Transaction that issued it. Schedules produced by Basic TO are guaranteed to be conflict serializable.

Introduction to deadlock prevention scheme by Timestamp protocol can be seen here.

Answer:

Related questions

11 votes
11 votes
3 answers
1
sh!va asked May 7, 2017
4,713 views
ACID properties of a transactions areAtomicity, consistency, isolation, databaseAtomicity, consistency, isolation, durabilityAtomicity, consistency, integrity, durability...
1 votes
1 votes
2 answers
3
snehareddy asked Feb 16, 2018
1,085 views
The number of elements in the power set of {{1,2},{2,1,1},{2,1,1,2}} is:
6 votes
6 votes
3 answers
4
junaid ahmad asked Dec 17, 2017
7,209 views
Q.A strictly binary tree with 10 leavesA) cannot have more than 19 nodesB) has exactly 19 nodesC)has exactly 17 nodesD) has exactly 20 nodes