1518 answer note the tree protocol of section 1515

Info iconThis preview shows pages 10–11. Sign up to view the full content.

View Full Document Right Arrow Icon
15.18 Answer: Note: The tree-protocol of Section 15.1.5 which is referred to in this question, is different from the multigranularity protocol of Sec- tion 15.3 and the B + -tree concurrency protocol of Section 15.10. One strategy for early lock releasing is given here. Going down the tree from the root, if the currently visited node’s child is not full, release locks held on all nodes except the current node, request an X-lock on the child node, after getting it release the lock on the current node, and then descend to the child. On the other hand, if the child is full, retain all locks held, request an X-lock on the child, and descend to it after getting the lock. On reaching the leaf node, start the insertion procedure. This strategy results in holding locks only on the full index tree nodes from the leaf upwards, until and including the Frst non-full node. An optimization to the above strategy is possible. Even if the current node’s child is full, we can still release the locks on all nodes but the current one. But after getting the X-lock on the child node, we split it right away. Releasing the lock on the current node and retaining just the lock on the appropriate split child, we descend into it making it the current node. With this optimization, at any time at most two locks are held, of a parent and a child node. 15.19 Answer: a. validationtestforFrst-committer-winsscheme:LetStart( T i ),Commit( T i ) and be the timestamps associated with a transaction T i and the up- date set for T i be update set( T i ). Then for all transactions T k with
Background image of page 10

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

View Full Document Right Arrow Icon
Practice Exercises 11 Commit( T k ) < Commit( T i ), one of the following two conditions must hold: If Commit( T k ) < Start( T k ), T k completes its execution before T i started, the serializability is maintained. If Start( T i ) < Commit( T k ) < Commit( T i ) and update set( T i ) and update set( T k ) do not intersect b. Validation test for Frst-committer-wins scheme with W-timestamps for data items: If a transaction T i writes a data item Q , then the W-timestamp( Q ) is set to Commit( T i ). ±or the validation test of a transaction T i to pass, following condition must hold: ±or each data item Q written by T i , W-timestamp( Q ) < Start( T i ) c. ±irst-updater-wins scheme: i. ±or a data item Q written by T i , the W-timestamp is assigned the timestamp when the write occurred in T i ii. Since the validation is done after acquiring the exclusive locks and the exclusive locks are held till the end of the transaction, the data item cannot be modiFed inbetween the lock acquisition and commit time. So, the result of validation test for a transaction would be the same at the commit time as that at the update time. iii.
Background image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page10 / 11

1518 Answer Note The tree protocol of Section 1515 which is...

This preview shows document pages 10 - 11. Sign up to view the full document.

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