CHAPTER 22: DATABASE RECOVERY TECHNIQUES
Answers to Selected Exercises
22.21 – Suppose that the system crashes before the [read_item,T3,A] entry is written to
the log in Figure 23.1 (b); will that make any difference in the recovery process?
22.22 – Suppose that the system crashes before the [write_item,T2,D,25,26] entry is
written to the log in Figure 23.1 (b); will that make any difference in the recovery process?
22.23 – Figure 23.6 shows the log corresponding to a particular schedule at the point of a
system crash for the four transactions T1, T2, T3, and T4 of Figure 19.4. Suppose that we
use the immediate update protocol with checkpointing. Describe the recovery process from
the system crash. Specify which transactions are rolled back, which operations in the log are
redone and which (if any) are undone, and whether any cascading rollback takes place.
Answer:
First, we note that this schedule is not recoverable, since transaction T4 has read the
committed before the checkpoint and hence is not involved in the recovery.
From Step 2, the operations that are to be undone are:
[write_item,T2,D,25]
[write_item,T3,A,30]
[write_item,T2,B,12]
Note that the operations should be undone in the reverse of the order in which they were