Strict serializability example clarification?

102 Views Asked by At

I am trying to learn the different consistency models and I ran into these slides. However, I can't interpret the slide below on strict serializability which slide 4 of the slides says that a read sees the latest write.

  • Does W(x)b mean write b in x?
  • Is the order of transactions moving from left to right? If so, why would P3 in the strictly serializable example read a from x (if the assumption in the previous bullet point above is correct), if P1 had already written b in x?

Example

1

There are 1 best solutions below

0
itisravi On

Does W(x)b mean write b in x?

It appears to be the other way around, i.e. Write x to b. So the operations are

  1. Write x to a
  2. Write x to b
  3. Write y to b
  4. Read x from a
  5. Read x from b
  6. Read y from b

Is the order of transactions moving from left to right? If so, why would...

Yes. If we assume the 4 time slices to be say t1 through t4, we see that in the second example, at time t3, the processes are trying to simultaneously write and read y from b (i.e. operations 3 and 6). This is not strictly serializable because you can get two different values depending on which operation you order first when you try to serialize the operations.