652 views

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$

Ans D)??
no
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)??
nope! can u draw the set diagram for this question?
exam on tomorrow. will try after that

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.

but all 2PL are serialisable

Is it serializable??

but 2PL is satisfying.

rt??

why it is not serialisable?

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

Please mention where this ordering is conflicting
See how they take lock and unlock in S2. Can every serializable schedule satisfies 2PL??
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
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?
 $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

Another question coming -

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

1 vote