Consider a schedule of transactions \(T_1\) and \(T_2\):…
2020
Consider a schedule of transactions \(T_1\) and \(T_2\):
\(\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|} \hline T_1 & RA & & & RC & & WD & & WB & \text{Commit} & \\ \hline T_2 & & RB & WB & & RD & & WC & & & \text{Commit} \\ \hline \end{array}\)
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 ?
Attempted by 121 students.
Show answer & explanation
Key insight: two schedules are conflict-equivalent iff every pair of conflicting operations (accesses to the same item where at least one is a write) appears in the same relative order in both schedules.
Identify conflicting pairs in the original schedule:
Item B: T2 does RB then WB, and T1 later does WB → conflict order: T2 before T1.
Item D: T2 does RD then T1 does WD → conflict order: T2 before T1.
Item C: T1 does RC before T2 does WC → conflict order: T1 before T2.
Why the correct option (the one above that was selected) works:
The schedule in the correct option preserves T2 before T1 for both conflicting pairs on items B and D.
It also preserves T1 before T2 for the conflicting pair on item C.
Because every conflicting pair keeps the same relative order, that schedule is conflict-equivalent to the original.
A video solution is available for this question — log in and enroll to watch it.