GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 51

GATE CSE 2015 Set 3 Q51

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

GATE 2015 Set 3, Q51 2 marks · MCQ
Report issue

Recovery & Logging

Question 51, GATE 2015: A partial schedule lists these operations in time order: 1 T1:read(A); 2 T1:write(A); 3 T2:read(C); 4 T2:write(C); 5 T2:read(B); 6 T2:write(B); 7 T2:read(A); 8 T2:commit; 9 T1:read(B). T1 fails immediately after time 9. Which statement is correct? (A) Abort T2, then restart both T1 and T2 to ensure atomicity. (B) The schedule is non-recoverable and cannot ensure transaction atomicity. (C) Abort and restart only T2 to ensure atomicity. (D) The schedule is recoverable and ensures atomicity without doing anything else.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (12 steps)

1. T2 reads A at time 7 after T1 writes it at time 2, before T1 commits.

2. T2 then commits at 8. When T1 fails after 9, its uncommitted value has already influenced a committed transaction. This violates recoverability: a reader must not commit before the transaction whose value it read. T2 cannot simply be treated as an uncommitted transaction to roll back. Thus B.

Original paper, page 73 · Answer key