A Lazy Snapshot Algorithm with Eager Validation

Most high-performance software transactional memories (STM) use optimistic invisible reads. Consequently, a transaction might have an inconsistent view of the objects it accesses unless the consistency of the view is validated whenever the view changes. Although all STMs usually detect inconsistencies at commit time, a transaction might never reach this point because an inconsistent view can provoke arbitrary behavior in the application (e.g., enter an infinite loop). In this paper, we formally introduce a lazy snapshot algorithm that verifies at each object access that the view observed by a transaction is consistent. Validating previously accessed objects is not necessary for that, however, it can be used on-demand to prolong the view's validity. We demonstrate both formally and by measurements that the performance of our approach is quite competitive by comparing other STMs with an STM that uses our algorithm.

[1]  Shiyong Lu,et al.  Correct execution of transactions at different isolation levels , 2004, IEEE Transactions on Knowledge and Data Engineering.

[2]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[3]  Bratin Saha,et al.  McRT-STM: a high performance software transactional memory system for a multi-core runtime , 2006, PPoPP '06.

[4]  William N. Scherer,et al.  Contention Management in Dynamic Software Transactional Memory ∗ , 2004 .

[5]  Virendra J. Marathe,et al.  Adaptive Software Transactional Memory , 2005, DISC.

[6]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[7]  Maurice Herlihy,et al.  Obstruction-free synchronization: double-ended queues as an example , 2003, 23rd International Conference on Distributed Computing Systems, 2003. Proceedings..

[8]  Torvald Riegel,et al.  Snapshot Isolation for Software Transactional Memory , 2006 .

[9]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[10]  Nir Shavit,et al.  Transactional Locking II , 2006, DISC.

[11]  Nir Shavit,et al.  What Really Makes Transactions Faster , 2006 .

[12]  Rachid Guerraoui,et al.  Polymorphic Contention Management , 2005, DISC.

[13]  Maurice Herlihy,et al.  Snapshots and software transactional memory , 2005, Sci. Comput. Program..

[14]  João P. Cachopo,et al.  Versioned boxes as the basis for memory transactions , 2006, Sci. Comput. Program..

[15]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[16]  Keir Fraser,et al.  Language support for lightweight transactions , 2003, SIGP.

[17]  Mark Plesko,et al.  Optimizing memory transactions , 2006, PLDI '06.

[18]  William N. Scherer,et al.  Advanced contention management for dynamic software transactional memory , 2005, PODC '05.