Previous | Next --- Slide 44 of 84
Back to Lecture Thumbnails
sareyan

In lazy versioning, how would a system ensure all the commits in the write buffer get written atomically? In eager versioning, how would all the writes be marked as readable by other threads at once?

probreather101

@sareyan the TM system should ensure these constraints to be true. For example, as you note, in eager versioning the writes are done directly to memory. However, this is precisely the reason each transaction keeps track of a read and write set; regarding being marked as "readable" at once, you could think of how the optimistic detection scheme resolves at the transaction commit points. At such a point, a committing transaction that is writing to memory would force any other transaction reading from the same memory address to abort and restart, thereby ensuring atomicity and shielding visibility of the write until after the transaction gets committed.

sareyan

@probreather101 what about w.r.t other code that is not marked as a transaction?

probreather101

@sareyan I think your question then relates to whether the transactional memory system provides strong or weak isolation. I believe the techniques that are presented in this lecture ensure weak isolation, in that the atomicity property is only preserved between transactions (but nontransaction code can read or write uncommitted data). Strong isolation (what you're asking) is possible but more difficult + less efficient -- there are tradeoffs to both. The links https://scialert.net/fulltext/?doi=itj.2010.192.200 and https://link.springer.com/chapter/10.1007/978-3-642-33078-0_23 have more info.

probreather101
  • rather, the isolation property is only preserved between transactions...
sareyan

Thanks!

Please log in to leave a comment.