CS157b
Chris Pollett
Apr 2, 2018
Which of the following statements is true?
I(A), R(A,t), t:=t*2, W(A,t), I(B), R(B,t), t:= t*2, W(B,t), O(A), O(B).
Transaction Op | Value t | Memory Value A | Disk Value A | Memory Value B | Disk Value B | Log Records |
---|---|---|---|---|---|---|
`\langle START \ T\rangle` | ||||||
I(A) | 4 | 4 | 6 | |||
R(A,t) | 4 | 4 | 4 | 6 | ||
t:=t*2 | 8 | 4 | 4 | 6 | ||
W(A,t) | 8 | 8 | 4 | 6 | `\langle T, A, 4\rangle` | |
I(B) | 4 | 4 | 4 | 6 | 6 | |
R(B,t) | 6 | 8 | 4 | 6 | 6 | |
t:= t*2 | 12 | 8 | 4 | 6 | 6 | |
W(B,t) | 12 | 8 | 4 | 12 | 6 | `\langle T, B, 6\rangle` |
FLUSH LOG | 12 | 8 | 4 | 6 | 6 | |
O(A) | 12 | 8 | 8 | 12 | 6 | |
O(B) | 12 | 8 | 8 | 12 | 12 | |
`\langle COMMIT \ T\rangle` | ||||||
FLUSH LOG |