The GATE Grind

GATE 2015 CS (CS3) – Question 51

Databases · Transactions and Concurrency Control · 2 marks · Multiple choice

A partial schedule is:

TimeT1T2
1read(A)
2write(A)
3read(C)
4write(C)
5read(B)
6write(B)
7read(A)
8commit
9read(B)

T1 fails immediately after time 9. Which is correct?

  1. Abort T2 then restart T1 and T2 to ensure atomicity
  2. The schedule is nonrecoverable and cannot ensure transaction atomicity
  3. Only abort and restart T2
  4. The schedule is recoverable and nothing else is needed

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) The schedule is nonrecoverable and cannot ensure transaction atomicity

Explanation

T2 reads A written by uncommitted T1 and then commits at time eight. T1 subsequently fails, invalidating a value already used by committed T2. Recoverability requires a reader to commit only after the writer it depends on commits; that condition is violated. Therefore the schedule is nonrecoverable, B.

More Transactions and Concurrency Control questions

All Transactions and Concurrency Control questions →