in Databases edited by
779 views
1 vote
1 vote

Let 2PL be a scheduler based on the two-phase locking protocol and let TS be a scheduler based on the timestamping protocol. Here is a schedule of three transactions:

r1(X), w1(X), r2(X), w2(X), r3(Y), w3(Y), r1(Y), w1(Y)

Determine the following:

Is the schedule serial?

Is it serializable?

Can it be produced by TS?

Can it be produced by 2PL?

Then, identify the true statement from the list below.

  1. S is serializable and S can be produced by 2PL
  2. S is serializable and S cannot be produced by 2PL
  3. S is serial and S can be produced by TS
  4. S is not serial and S can be produced by 2PL
in Databases edited by
by
779 views

3 Answers

0 votes
0 votes
it is serializable so it can be produced by 2PL.

the conflict pairs of transaction do not follow the order of timestamps(T1<T2<T3) because R3(y) W1(y) is conflict pair do not follow order so it is not produced by time stamp ordering protocol .
by
0 votes
0 votes

1) No it is not a serial schedule. As here T1 states comes at first and also at last

2) No it is not serializable. As here coflicting situation are there. (Timestamp ordering also not maintained in all cases)

3)Yes, it can be produced by Basic TS and Thomas Write Rule , by Basic TS  it is  serial (Basic TS and TWR allowed  ).

4) No. For maintaining 2PL the schedule has to be serial schedule.

edited by

2 Comments

any schedule produced by Time stamp protocol then it must be serializable and deadlock free.

if it produced by 2PL protocol then it is serializable but about deadlock we can not say.
1
1
see Gate 2010 Question's discussion.

https://gateoverflow.in/2196/gate2010_20
1
1
0 votes
0 votes
Its serilizable and the order is T3->T1->T2. But not possible under 2PL.

So, (B).