{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

D what problem would arise with the above technique

Info iconThis preview shows pages 3–5. Sign up to view the full content.

View Full Document Right Arrow Icon
d. What problem would arise with the above technique, if transactions perform a large number of updates? Answer: a. The old-value part of an update log record is not required. If the transaction has committed, then the old value is no longer necessary as there would be no need to undo the transaction. And if the trans- action was active when the system crashed, the old values are still safe in the stable storage as they haven’t been modiFed yet. b. During the redo phase, the undo list need not be maintained any more, since the stable storage does not re±ect updates due to any uncommitted transaction. c. A data item read will Frst issue a read request on the local memory of the transaction. If it is found there, it is returned. Otherwise, the item is loaded from the database buffer into the local memory of the transaction and then returned. d. If a single transaction performs a large number of updates, there is a possibility of the transaction running out of memory to store the local copies of the data items.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
18 Chapter 16 Recovery System 16.6 The shadow-paging scheme requires the page table to be copied. Suppose the page table is represented as a B + -tree. a. Suggest how to share as many nodes as possible between the new copy and the shadow-copy of the B + -tree, assuming that updates are made only to leaf entries, with no insertions and deletions. b. Even with the above optimization, logging is much cheaper than a shadow-copy scheme, for transactions that perform small updates. Explain why. Answer: a. To begin with, we start with the copy of just the root node pointing to the shadow-copy. As modiFcations are made, the leaf entry where the modiFcation is made and all the nodes in the path from that leaf node till the root, are copied and updated. All other nodes are shared. b. ±or transactions that perform small updates, the shadow-paging scheme, would copy multiple pages for a single update, even with the above optimization. Logging, on the other hand just requires small records to be created for every update; the log records are physically together in one page or a few pages, and thus only a few log page I/O operations are required to commit a transaction. ±ur- thermore, the log pages written out across subsequent transaction commits are likely to be adjacent physically on disk, minimizng disk arm movement. 16.7 Suppose we (incorrectly) modify the recovery algorithm of Section 16.4 to not log actions taken during transaction rollback. When recovering from a system crash, transactions that were rolled back earlier would then be included in undo-list, and rolled back again. Give an example to show how actions taken during the undo phase of recovery could result in an incorrect database state. (Hint: Consider a data item updated by an aborted transaction, and then updated by a transaction that commits.) Answer: Consider the following log records generated with the (incor- rectly) modiFed recovery algorithm: 1. < T 1 start> 2. < T 1 , A, 1000, 900>
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page3 / 8

d What problem would arise with the above technique if...

This preview shows document pages 3 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online