How are log sequence numbers used by ARIES to reduce the amount of REDO work needed for recovery? Illustrate with an example using the information shown in Figure 23.5. You can make your own assumptions as to when a page is written to disk.
What will be an ideal response?
Since ARIES writes the Dirty Page Table to the LOG at checkpoint time, ARIES can use the LSN (log sequence number) information stored in that table and the data pages during recovery.
REDO only has to start after the point where all prior changes are known to be in the database. Hence, REDO can start at the place in the LOG that corresponds to the smallest LSN from the Dirty Page Table.
In Figure 23.5, since the smallest LSN in the Dirty Page Table is 1, REDO must start at location 1 in the LOG. Let's assume that when Transaction T2 performed the update of page C, page C was written to disk. So, page C on disk would have an associated LSN of 7. When REDO starts at location 1 in the LOG (LSN of 1), page C would be read into the main memory buffer, however no change is necessary since the the LSN of page C is 7, which is larger than LSN of 1 for the current LOG update operation. Proceeding with location 2
in the LOG, page B would be brought into memory. If the LSN of page B is less than 2, then page B would be updated with the corresponding change in location 2 in the LOG. Similarly for location 6, page A would be updated. For location 7, Page C need not be updated since the LSN of page C (i.e., 7) is not less than the LSN of the current LOG update operation.
You might also like to view...
A public Internet access point at an airport or a coffeehouse is known as a piconet.
Answer the following statement true (T) or false (F)
Property settings can be changed in the ________
Fill in the blank(s) with correct word
A ____________________ multimedia project allows users to sit back and watch it just as they watch a movie or the television.
Fill in the blank(s) with the appropriate word(s).
XPS documents can be in the XPS Document format or the ____________________ Document format.
Fill in the blank(s) with the appropriate word(s).