A Lazy Snapshot Algorithm with Eager Validation

  • Torvald Riegel
  • Pascal Felber
  • Christof Fetzer
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4167)

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Shavit, N., Touitou, D.: Software transactional memory. In: Proceedings of PODC (1995)Google Scholar
  2. 2.
    Saha, B., Adl-Tabatabai, A.R., Hudson, R.L., Minh, C.C., Hertzberg, B.: McRT-STM: a high performance software transactional memory system for a multi-core runtime. In: PPoPP 2006: Proceedings of the eleventh ACM SIGPLAN symposium on Principles and practice of parallel programming (2006)Google Scholar
  3. 3.
    Harris, T., Plesko, M., Shinnar, A., Tarditi, D.: Optimizing Memory Transactions. In: PLDI 2006: ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (2006)Google Scholar
  4. 4.
    Dice, D., Shavit, N.: What really makes transactions fast? In: TRANSACT (2006)Google Scholar
  5. 5.
    Herlihy, M.P., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990)CrossRefGoogle Scholar
  6. 6.
    Riegel, T., Fetzer, C., Felber, P.: Snapshot isolation for software transactional memory. In: TRANSACT 2006 (2006)Google Scholar
  7. 7.
    Berenson, H., Bernstein, P., Gray, J., Melton, J., O’Neil, E., O’Neil, P.: A critique of ANSI SQL isolation levels. In: Proceedings of SIGMOD, pp. 1–10 (1995)Google Scholar
  8. 8.
    Harris, T., Fraser, K.: Language support for lightweight transactions. In: Proceedings of OOPSLA, pp. 388–402 (2003)Google Scholar
  9. 9.
    Herlihy, M., Luchangco, V., Moir, M., Scherer III, W.: Software transactional memory for dynamic-sized data structures. In: Proceedings of PODC (2003)Google Scholar
  10. 10.
    Herlihy, M., Luchangco, V., Moir, M.: Obstruction-free synchronization: Double-ended queues as an example. In: Proceedings of the 23rd IEEE International Conference on Distributed Computing Systems (2003)Google Scholar
  11. 11.
    Scherer III, W.N., Scott, M.L.: Contention management in dynamic software transactional memory. In: Proceedings of the PODC Workshop on Concurrency and Synchronization in Java Programs (2004)Google Scholar
  12. 12.
    Scherer III, W.N., Scott, M.L.: Advanced contention management for dynamic software transactional memory. In: Proceedings of PODC (2005)Google Scholar
  13. 13.
    Marathe, V.J., Scherer III, W.N., Scott, M.L.: Adaptive software transactional memory. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 354–368. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  14. 14.
    Cole, C., Herlihy, M.: Snapshots and software transactional memory. Science of Computer Programming (2005)Google Scholar
  15. 15.
    Dice, D., Shalev, O., Shavit, N.N.: Transactional locking II. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 194–208. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  16. 16.
    Cachopo, J., Rito-Silva, A.: Versioned boxes as the basis for memory transactions. In: Proceedings of SCOOL (2005)Google Scholar
  17. 17.
    Guerraoui, R., Herlihy, M.P., Pochon, B.: Polymorphic contention management. In: Fraigniaud, P. (ed.) DISC 2005. LNCS, vol. 3724, pp. 303–323. Springer, Heidelberg (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Torvald Riegel
    • 1
  • Pascal Felber
    • 2
  • Christof Fetzer
    • 1
  1. 1.Dresden University of TechnologyDresdenGermany
  2. 2.University of NeuchâtelNeuchâtelSwitzerland

Personalised recommendations