As discussed in Exercise 18.15, snapshot isolation can be implemented using a form of timestamp validation. However,
Question:
As discussed in Exercise 18.15, snapshot isolation can be implemented using a form of timestamp validation. However, unlike the multi-version timestamp ordering scheme, which guarantees serializability, snapshot isolation does not guarantee serializability.
Explain the key difference between the protocols that result in this difference.
Exercise 18.15
The snapshot isolation protocol uses a validation step which, before performing a write of a data item by transaction T, checks if a transaction concurrent with T has already written the data item.
a. A straightforward implementation uses a start timestamp and a commit timestamp for each transaction, in addition to an update set, that, is the set of data items updated by the transaction. Explain how to perform validation for the first-committer-wins scheme by using the transaction timestamps along with the update sets. You may assume that validation and other commit processing steps are executed serially, that is, for one transaction at a time,
b. Explain how the validation step can be implemented as part of commit processing for the first-committer-wins scheme, using a modification of the above scheme, where instead of using update sets, each data item has a write timestamp associated with it. Again, you may assume that validation and other commit processing steps are executed serially.
c. The first-updater-wins scheme can be implemented using timestamps as described above, except that validation is done immediately after acquiring an exclusive lock, instead of being done at commit time.
i. Explain how to assign write timestamps to data items to implement the first-updater-wins scheme.
ii. Show that as a result of locking, if the validation is repeated at commit time the result would not change.
iii. Explain why there is no need to perform validation and other commit processing steps serially in this case.
Step by Step Answer:
Database System Concepts
ISBN: 9780078022159
7th Edition
Authors: Abraham Silberschatz, Henry F. Korth, S. Sudarshan