Consider a schedule of transactions T1 and T2: T1 RA RC WD WB Commit T2 RB WB RD WC Commit Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule?
Consider a schedule of transactions T1 and T2: T1 RA RC WD WB Commit T2 RB WB RD WC Commit Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule? Correct Answer <table border="1" cellpadding="0" cellspacing="0" style="width:400px;" width="456"> <tbody> <tr> <td style="height:28px;"> <p style="text-align: center;">T<sub>1</sub></p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;">RA</p> </td> <td style="height:28px;"> <p style="text-align: center;">RC</p> </td> <td style="height:28px;"> <p style="text-align: center;">WD</p> </td> <td style="height:28px;"> <p style="text-align: center;">WB</p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;">Commit</p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> </tr> <tr> <td style="height:28px;"> <p style="text-align: center;">T<sub>2</sub></p> </td> <td style="height:28px;"> <p style="text-align: center;">RB</p> </td> <td style="height:28px;"> <p style="text-align: center;">WB</p> </td> <td style="height:28px;"> <p style="text-align: center;">RD</p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;">WC</p> </td> <td style="height:28px;"> <p style="text-align: center;"> </p> </td> <td style="height:28px;"> <p style="text-align: center;">Commit</p> </td> </tr> </tbody> </table>
Concept:
Two schedules S1 and S2 are termed to be conflict equivalent if the conflict operations in both the schedules are executed in same order. The conflict operations are identified by RW, WR, and WW pairs.
Explanation:
The given Schedule in question is:
|
T1 |
T2 |
|
R(A)
R(C)
W(D)
W(B) Commit |
R(B) W(B)
R(D)
W(C)
Commit |
The conflict pairs are:
R2(B)-> W1(B)
W2(B)-> W1(B)
R1(C)-> W2(C)
R2(D)-> W1(D)
The schedule in which these pairs are executed in the same order would be conflict equivalent to this given schedule.
Only the schedule in option 1 has all these 4 pairs in the same order of execution and thus is conflict equivalent to a given schedule.