Skip to content

ISRO Scientist/Engineer CSE 2018Databases › Transactions and Concurrency Control

ISRO Scientist/Engineer CSE 2018 PYQ: Let us assume that transaction $T1$ has arrived before transaction $T2$. Consider the schedule…

Let us assume that transaction $T1$ has arrived before transaction $T2$. Consider the schedule $s=r1(A);r2(B): w2(A); w1(B)$

Which of the following is true?

  1. A
    Allowed under basic timestamp protocol.
  2. B
    Not allowed under basic timestamp protocols because $T1$ is rolled back.
    Correct answer
  3. C
    Not allowed under basic timestamp protocols because $T2$ is rolled back.
  4. D
    None of these

Answer

(B) Not allowed under basic timestamp protocols because $T1$ is rolled back.

Approach

Apply the basic timestamp ordering (TO) protocol rules. Since T1 arrived before T2, TS(T1) < TS(T2). For each conflicting pair of operations on the same data item, the one with the smaller timestamp must execute first. Check each conflict in the schedule s = r1(A); r2(B); w2(A); w1(B).

Reviewed by ISRO IQ Editorial Team.