Three transactions to update inventory A, B, and C:
Time
Operations
T1
T2
T3
Item A
Item B
Item C
1
Begin Transaction T1
Begin
20
20
20
2
T1 reads item A
Read(A)
3
T1 write item A
A=A+1
4
Begin Transaction T2
Begin
5
T2 reads item B
Read(B)
6
T2 write item B
B=B+5
7
Begin Transaction T3
Begin
8
T1 COMMITS
Commit
9
T3 reads item C
Read(C)
10
T3 write item C
C=C+4
11
T2 reads item B
Read(B)
12
T2 write item B
B=B+2
13
T2 Commit***
Commit
14
T3 COMMITS
Commit
The number of final inventory of Items A, B, and C
?
?
?
Suppose that a crash occurs right after the log record with asterisks (***) next to it is written to disk, and the recovery procedure is then run.
a) Please replace question market (?) with the number inventory for products A, B, and C (6 points)
b) Which transactions get roll back? Which ones get roll forward? (3 points)