GATE 2015 CS (CS2) – Question 39
A simple-checkpoint recovery log contains:
(start,T4); (write,T4,y,2,3); (start,T1); (commit,T4);
(write,T1,z,5,7); (checkpoint);
(start,T2); (write,T2,x,1,9); (commit,T2);
(start,T3); (write,T3,z,7,2);A crash occurs now. Choose the undo and redo lists.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) Undo T3,T1; redo T2
Explanation
T1 and T3 lack commit records, so their effects must be undone, including T1 even though it began before the checkpoint. T2 committed after the checkpoint and must be redone. T4 committed before the checkpoint, so its effects are already covered by the checkpoint. Thus A.