73.7k views
0 votes
The following is a sequence of undo-log records written by two transactions T and U: < START T>; ; < START U>; ; ; ; ; < T ,E , 50>; . Describe the action of the recovery manager, including changes to both disk and the log, if there is a crash and the last log record to appear on disk is:

User T Q
by
6.5k points

1 Answer

0 votes

Answer:

Giving that: The following is a sequence of undo-log records written by 2 transactions T and U:

< START T >;

< T,A,10 >;

< START U >;

< U, B, 20 >;

< T, C, 30 >;

< U, D, 40 >;

< Commit U >;

< T, E, 50 >;

< Commit T >;

1. < START U >

Recovery action in this case will be undo(-1) and undo(0). All restored to its original Value

log records < T, A, 10 >, < T, abort >; as written out

2. < T, E, 50 >

Recovery action in this case will be undo(8) and redo(0). A and C is restored to its original value, B and D are set to 20 and 40

log records <T, C, 30 >, < T, A, 10 >, < T, abort > are written out

3. < Commit T >

Recovery action in this case will be redo(7) and redo(4). A and C are set to 10 and 30, B and D are set to 20 and 40

User Ktenney
by
6.7k points