Banking problem




(page 1)


First implementation: mmap a file

R = B.balance;
R = B.balance;
R = R + $1;
B.balance = R;
R = R + $1;
B.balance = R;

(page 2)


Next implementation: Shadow files




(page 3)


Transactions


BEGIN
actions
END



(page 4)


Locks






(page 5)


When do actions not complete?


(page 6)


Save points



(page 7)


Nested transactions



(page 8)


Logging

within one transaction


(page 9)


What's in a log record?



(page 10)


Commit processing





(page 11)


Checkpoints




(page 12)


System restart



(page 13)


Locking and UNDO



(page 14)


Cleaning the log


(page 15)


Recovery from media failure




(page 16)


Other transaction techniques




(page 17)