Ri(A) and Wi(A) denote read and write of data item A by transaction Ti,i=1,2,3.
The transaction T1 aborts at the end. Which other transaction(s) will be required to be rolled back?
R1(X)W1(Y)R2(X)R2(Y)R3(Y)ABORT(T1)
Correct : c
Explanation:
1. Analyze the Sequence of Operations:
Let's look closely at the chronological execution order of the schedule:
• T1 performs a write operation on data item Y: W1(Y)
• T2 subsequently performs a read operation on the same data item Y: R2(Y)
• T3 then performs a read operation on the same data item Y: R3(Y)
• T1 fails and encounters an abort operation: ABORT(T1)
2. Identify Dirty Reads (Data Dependency):
• Because T2 reads the value of Y after T1 wrote it but before T1 committed or aborted, T2 has performed a dirty read from T1.
• Similarly, because T3 reads the value of Y after T1 wrote it, T3 has also performed a dirty read from T1.
3. Cascading Rollback Mechanism:
• When a transaction aborts, any changes it made to the database are completely undone.
• Since T2 and T3 read an uncommitted, temporary value of Y produced by T1, their computations are based on dirty, invalid data.
• To maintain database consistency and isolation, any transaction that has read uncommitted data from an aborted transaction must also be rolled back. This phenomenon is known as a cascading rollback (cascading abort).
4. Conclusion:
Since both T2 and T3 are dependent on the uncommitted write of T1, both transactions are required to be rolled back when T1 aborts.
Similar Questions
Total Unique Visitors