Let us assume that transaction T1 has arrived before transaction T2. Consider…

2018

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

  3. C.

    Not allowed under basic timestamp protocols because T2 is rolled back

  4. D.

    None of these

Attempted by 153 students.

Show answer & explanation

Correct answer: B

In the Timestamp Ordering Protocol, transactions are assigned timestamps upon arrival (TS(T1) < TS(T2)). The schedule involves T2 reading B before T1 writes to it. When r2(B) executes, the read timestamp of B (RTS(B)) is updated to TS(T2). Later, when T1 attempts w1(B), the protocol checks if TS(T1) < RTS(B). Since TS(T1) is less than TS(T2), T1 violates the protocol rule for writing to a data item already read by a newer transaction. Therefore, T1 must be aborted and rolled back.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Isro