GATE / CS ARCHIVE

GATE CSE 2015 SET 2 / QUESTION 39

GATE CSE 2015 Set 2 Q39

Database Management Systems · Recovery & Logging · Full GATE CSE 2015 Set 2 paper

GATE 2015 Set 2, Q39 2 marks · MCQ
Report issue

Recovery & Logging

Question 39, GATE 2015: Simple checkpoint log: startT4; writeT4 y2→3; startT1; commitT4; writeT1 z5→7; checkpoint; startT2; writeT2 x1→9; commitT2; startT3; writeT3 z7→2; crash. Choose undo/redo lists: A undoT3, T1/redoT2; B same undo/redoT2, T4; C no undo/redo all four; D undoT3, T1, T4/redoT2.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

T4 committed before the completed checkpoint and needs no redo. T2 committed after it and must be redone. T1 and T3 are incomplete at crash and must be undone, including T1 begun before the checkpoint. Hence Undo{T3, T1}, Redo{T2}, A, under the stated simple checkpoint model.

Classify transactions by completion relative to the checkpoint and crash. T4 committed before the completed checkpoint, so the simple model treats its effects as safely checkpointed. T2 committed later and needs redo to ensure its updates appear. T1 and T3 have no commit record, so their changes must be undone, even though T1 started before the checkpoint. Starting before a checkpoint does not automatically make an unfinished transaction safe. More elaborate recovery protocols may scan different worklists, but this is the stated simple model.

Original paper, page 39 · Answer key