| 1. |
Under A Modified Version Of The Timestamp Protocol, We Require That A Commit Bit Be Tested To See Whether A Read Request Must Wait. Explain How The Commit Bit Can Prevent Cascading Abort. Why Is This Test Not Necessary For Write Requests? |
|
Answer» Using the commit bit, a read request is made to wait if the transaction which wrote the data ITEM has not yet COMMITTED. Therefore, if the writing transaction fails before commit, we can abort that transaction alone. The waiting read will then ACCESS the EARLIER version in case of a multiversion system, or the restored value of the data item after abort in case of a single-version system. For writes, this commit bit checking is unnecessary. That is because either the write is a “blind” write and thus independent of the old value of the data item or there was a prior read, in which case the test was already applied. Using the commit bit, a read request is made to wait if the transaction which wrote the data item has not yet committed. Therefore, if the writing transaction fails before commit, we can abort that transaction alone. The waiting read will then access the earlier version in case of a multiversion system, or the restored value of the data item after abort in case of a single-version system. For writes, this commit bit checking is unnecessary. That is because either the write is a “blind” write and thus independent of the old value of the data item or there was a prior read, in which case the test was already applied. |
|