in Databases retagged by
652 views
0 votes
0 votes

A' is set of all possible schedules

'C' is set of all possible schedules that are guaranteed to produce a correct final result

'S' is the set of all serializable schedules

'P' is the set of all schedules possible under 2-phase locking protocol 
Which is FALSE?

  1. $P\subseteq C$
  2. $S\subset P$
  3. $S\subseteq P$
  4. $P\subset C$
in Databases retagged by
by
652 views

15 Comments

Ans D)??
0
0
no
0
0
Here correct statement is all serial schedule might not be 2-phase locked

and all 2PL maynot be serial schedule.

But all 2PL must give correct result.

So, is it B)??
0
0
nope! can u draw the set diagram for this question?
0
0
exam on tomorrow. will try after that
0
0

A transaction schedule is serializable if its outcome (e.g., the resulting database state) is equal to the outcome of its transactions executed serially, i.e. without overlapping in time. 

Seraializable is a superset of P and is equivalent to C.

Not all serializable schedules are allowed by 2PL, but all 2PL are serialisable, so S must be a superset of P.

Example S1: w1(x) w3(x) w2(y) w1(y) The lock by T1 for y must occur after w2(y), so the unlock by T1 for x must also occur after w2(y) (according to 2PL).

Because of the schedule legality, w3(x) cannot occur where shown in S1 because T1 holds the x lock at that point. However, S1 serializable (equivalent to T2, T1, T3).

So: B and C both are false according to me.

For diag and read: https://www2.cs.sfu.ca/CourseCentral/454/bzhou/documents/s7.pdf

0
0

 but all 2PL are serialisable

no, 2PLnot check about serializability 

0
0
0
0

then what about this schedule??https://www.gateoverflow.in/235026/test-series?show=243203

Is it serializable??

but 2PL is satisfying.

rt??

0
0
why it is not serialisable?

For S1: T2-->T1, For S2: 1-->3-->2

Please mention where this ordering is conflicting
0
0
See how they take lock and unlock in S2. Can every serializable schedule satisfies 2PL??
0
0
Please see my comment again, I never said all serialisable satisfies 2PL, I said all 2PL satisfies serialisable, Also you can go to the link I mentioned in my first comment
0
0
According to forouzan
"Although the 2PL guarantees serializability (that is, every schedule permitted is serializable, it doesnot permit all possible serializable schedule.(some serializable schedule prohibited by this protocol))"

What they mean by it?
0
0
$T_{1}$ $T_{2}$

S(Y)

R(X)

U(Y)

 

E(X)

R(X)

X=X+Y

W(X)

UX(X)

 

S(X)

R(X)

U(X)

E(Y)

R(Y)

Y=X+Y

W(Y)

UX(Y)

 

 

This is not 2PL, right?? because non-serializable. Then what locking is it?

P.S.-This diagram from forouzan

0
0
Another question coming -

Why every 2PL need to be serializable? What is it's advantage??
0
0

Please log in or register to answer this question.