# Timestamp based concurrency

concurrencytimestamptransaction

I am wondering if someone could help me out with a question I have about time stamp based concurrency.

I found the following practice problem on a website

It basically asks which of the following 4 will occur for the LAST transaction:

(a) the request is accepted.

(b) the request is ignored.

(c) the transaction is delayed.

(d) the transaction is rolled back.


The stands for the order of the time stamps and the = read = write

st1; st2; r2(A); co2; r1(A); w1(A)


The solution they give is choice (d) which had me kind of confused as to how they are coming to that. I may be mistaken about how the time stamps work but I thought that if a transaction wishes to access a shared variable it must have the earliest time stamp. In this example transaction 2 tries to read(A) first but I thought that should be delayed (since transaction 1 has the earlier of the 2 time stamps. So once we get to the r1(A), w1(A) since transaction 1 has the earlier stamp that should succeed as I understand it so I'm not sure why they choose (d). If I am misunderstanding the concept could someone please explain it to me I would greatly appreciate it.