edited by
22,549 views
51 votes
51 votes

Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?

  1. $2$-phase locking
  2. Time-stamp ordering
    1. I only
    2. II only
    3. Both I and II
    4. Neither I nor II
edited by

6 Answers

Best answer
57 votes
57 votes
In basic two phase locking there is a chance for deadlock

Conservative $\text{2pl}$ is deadlock free

I go with B.
17 votes
17 votes
Answer is B.

2PL ensures conflict serializability but is not deadlock free.

Timestamp ordering ensures conflict serializability because if any action causes violation in serializability order that was being followed from beginning of schedule, then the transaction is rolled back and again started with new timestamp.

It also ensures freedom from deadlock because there are no locks.. which means no mutual exclusion.
6 votes
6 votes

Two phase locking ensures conflict serializable schedules, but does not ensure freedom from deadlock.

One the other hand, Timestamp ordering protocol ensures freedom from deadlock but does not ensure conflict serializable schedules.

ensure = every schedule is conflict serializable. Hence the answer is D

Reference: http://codex.cs.yale.edu/avi/db-book/db4/slide-dir/ch16-2.pdf

Additional info: Tree based protocol ensures both, freedom from deadlocks and conflict serializable schedule.

Answer:

Related questions

31 votes
31 votes
4 answers
1
go_editor asked Sep 30, 2014
10,442 views
Consider the following schedule for transactions $T1, T2$ and $T3:$$$\begin{array}{|c|c|c|}\hline \textbf{T1} & \textbf{T2} & \textbf{T3} \\\hline \text{Read(X)} & \text...
41 votes
41 votes
8 answers
2
29 votes
29 votes
2 answers
3
go_editor asked Sep 29, 2014
8,292 views
A relational schema for a train reservation database is given below.passenger(pid, pname, age)reservation(pid, class, tid)$$\overset{\text{Passenger}}{\begin{array}{|c|c|...
56 votes
56 votes
8 answers
4
go_editor asked Sep 29, 2014
32,704 views
Consider a $B^+$-tree in which the maximum number of keys in a node is $5$. What is the minimum number of keys in any non-root node?$1$$2$$3$$4$