Previous | Next --- Slide 42 of 65
Back to Lecture Thumbnails
blah329

Data Versioning Techniques:

Eager Versioning: Eager versioning hopes that the transaction will not abort, and thus, any modifications that are made are made directly to memory. However, there must be some mechanism that handles the case in which the transaction has to abort. All changes to memory locations are logged so that in case a transaction must abort, the log can be used to restore the contents of memory to what they were before any modifications were made. When a transaction commits, all of the effects of the memory accesses have already been performed, and thus on committing all that needs to be done is to get rid of the log, as it is no longer necessary.

Lazy Versioning: Lazy versioning assumes that the transaction will fail, and thus, any modifications to memory are buffered instead of applied directly to memory. The implications of this are that in case the transaction must abort, no changes have actually been made to memory, so all that needs to be done is eliminate the buffer that was being used to store the modifications to memory, thus making an abort quick and simple. However, when a transaction commits, it could be slower than using an eager versioning policy, as the modifications in the buffer have to be flushed to memory.

rsvaidya

Eager Versioning can also be treated as optimistic approach and Lazy versioning as pessimistic approach.