100% found this document useful (1 vote)
835 views5 pages

Questions On Conflict Serializable - EDUGRABS

The document discusses questions related to determining whether transaction schedules are conflict serializable. It provides the definitions of conflict serializable and presents the steps to check for conflict serialization. It then works through 6 examples of transaction schedules involving reads and writes of different data items. For each schedule, it identifies the conflict pairs, draws the dependency graph and determines if the schedule is conflict serializable or not based on whether a cycle is present in the graph.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
835 views5 pages

Questions On Conflict Serializable - EDUGRABS

The document discusses questions related to determining whether transaction schedules are conflict serializable. It provides the definitions of conflict serializable and presents the steps to check for conflict serialization. It then works through 6 examples of transaction schedules involving reads and writes of different data items. For each schedule, it identifies the conflict pairs, draws the dependency graph and determines if the schedule is conflict serializable or not based on whether a cycle is present in the graph.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

6/5/2017 QuestionsonConflictSerializableEDUGRABS

QuestionsonConflictSerializable
Question1:Checkwhethertheschedulesisconflictserializableornot?S:R2(A);W2(A);R3
(C);W2(B);W3(A);W3(C);R1(A);R1(B);W1(A);W1(B)

Solution:

ConflictPairs DependencyRelation
W2(A)W3(A) T2T3
W3(A)R1(A) T3T1
W2(B)R1(B) T2T1

Nocycleformed.Therefore,conflictserializablescheduleandthe
equivalentserialscheduleis
T2T3T1.

http://www.edugrabs.com/questionsonconflictserializable/ 1/5
6/5/2017 QuestionsonConflictSerializableEDUGRABS

Question2:Checkwhetherthescheduleareconflictserializableornot?S:R2(A);R3(C);W3
(A);W2(A);W2(B);W3(C);R1(A);R1(B);W1(A);W1(B)

Solution:

ConflictPairs DependencyRelation
R1(A)W3(A) T2T3
W3(A)W2(A) T3T2
W2(A)R1(A) T2T1
W2(B)R1(B) T2T1

Nocycleformed.Therefore,conflictserializablescheduleandthe
equivalentserialscheduleis
T2T3T1.

Question3:Checkwhetherthescheduleisconflictserializableornot?S:R1(A);R2(A);R3(B);
W1(A);R2(C);R2(B);W2(B);W1(C)
http://www.edugrabs.com/questionsonconflictserializable/ 2/5
6/5/2017 QuestionsonConflictSerializableEDUGRABS

Solution:


Step1:Createanodeforeachtransaction.

Step2:Findtheconflictpairs(RW,WR,WW)onsamevariableby
differenttransactions.
R2(C);W1(C)
R3(B);W2(B)
R2(A);W1(A)
Step3:Drawanedgeforeachconflictpair.


AsCycleformed,ThereforeScheduleisnotaconflictserializable
schedule.

Question4:Checkwhetherthescheduleisconflictserializableornot?S:W3(A);R1(A);W1(B);
R2(B);W2(C);R3(C)

Solution:

Step1:Createanodeforeachtransaction.
(performedinquestion3)

Step2:Findtheconflictpairs(RW,WR,WW)onsamevariableby
differenttransactions.
W2(C);R3(C)
W1(B);R2(B)
W3(A);R1(A)
Step3:Drawanedgeforeachconflictpair.

http://www.edugrabs.com/questionsonconflictserializable/ 3/5
6/5/2017 QuestionsonConflictSerializableEDUGRABS


AsCycleformed,ThereforeScheduleisnotaconflictserializable
schedule.

Question5:Checkwhetherthescheduleisconflictserializableornot?S:R2(x);W3(x);W1(y);
R2(y);W2(z)

Solution:

Step1:Createanodeforeachtransaction.

Step2:Findtheconflictpairs(RW,WR,WW)onsamevariableby
differenttransactions.
R2(x);W3(x)
W1(y);R2(y)
Step3:Drawanedgeforeachconflictpair.


AsNoCycleformed,ThereforeScheduleisconflictserializable
andequivalentserialscheduleisT1T2T3.

Question6:ConsiderthreedataitemsD1,D2,andD3,andthefollowingexecutionscheduleoftra
nsactionsT1,T2,andT3.Inthediagram,R(D)andW(D)denotetheactionsreadingandwritingth

http://www.edugrabs.com/questionsonconflictserializable/ 4/5
6/5/2017 QuestionsonConflictSerializableEDUGRABS

edataitemDrespectively.S:R2(D3);R2(D2);W2(D2);R3(D2);R3(D3);R1(D1);W1(D1);W3(D2);W3

(D3);R2(D1);R1(D2);W1(D2);W2(D1) W2(D1)

Solution:

Step1:Createanodeforeachtransaction.

Step2:Findtheconflictpairs(RW,WR,WW)onsamevariableby
differenttransactions.
W1(D1);W2(D1)[1a]
W1(D1);R2(D1)[1d]
R2(D3);W3(D3)[3e]
W2(D2);W3(D2)[42]
W2(D2);R3(D2)[4f]
W3(D2);W1(D2)[2b]
W3(D2);R1(D2)[2c]

http://www.edugrabs.com/questionsonconflictserializable/ 5/5

You might also like