Skip to main content
Log in

A Single-Version STM that Is Multi-Versioned Permissive

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

We present PermiSTM, a single-version STM that satisfies a practical notion of permissiveness, usually associated with keeping many versions: it never aborts read-only transactions, and it aborts other transactions only due to a conflicting transaction (writing to a common data item), thereby avoiding spurious aborts. PermiSTM also avoids unnecessary contention on the memory, being disjoint-access parallel.

We first present a variant of PermiSTM that uses k-compare-single-swap primitive. Then we present a variant with similar properties using only cas, and show how the livelocks it may incur can be avoided with best-effort hardware transactions.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Pseudocode 1
Pseudocode 2
Fig. 4
Pseudocode 3
Pseudocode 4

Similar content being viewed by others

Notes

  1. In the full model, read and write operations may also cause a transaction to forcibly abort; however, this does not happen in our algorithms.

  2. This is analogous to the notion of current version of a transactional object in DSTM [18].

  3. An alternative is to use dcas, but we wanted to explore how to use the recently proposed architectures supporting BEHTM [10, 24, 29].

  4. In [3, 27] disjoint-access parallel STMs are referred to as weakly disjoint-access parallel as opposed to strongly disjoint-access parallel implementations.

References

  1. Afek, Y., Merritt, M., Taubenfeld, G., Touitou, D.: Disentangling multi-object operations. In: Proceedings of the 16th Annual ACM Symposium on Principles of Distributed Computing (PODC), pp. 111–120 (1997)

    Google Scholar 

  2. Attiya, H., Hillel, E.: The cost of privatization. In: Proceedings of the 24th International Conference on Distributed Computing (DISC), pp. 35–49 (2010)

    Google Scholar 

  3. Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. Theory Comput. Syst. 49(4), 698–719 (2011)

    Article  MathSciNet  Google Scholar 

  4. Aydonat, U., Abdelrahman, T.: Serializability of transactions in software transactional memory. In: 3rd ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2008)

    Google Scholar 

  5. Cachopo, J.P., Silva, A.R.: Versioned boxes as the basis for memory transactions. Sci. Comput. Program. 63(2), 172–185 (2006)

    Article  MATH  Google Scholar 

  6. Carouge, F., Spear, M.: A scalable lock-free universal construction with best effort transactional hardware. In: Proceedings of the 24th International Conference on Distributed Computing (DISC), pp. 50–63 (2010)

    Google Scholar 

  7. Dice, D., Lev, Y., Marathe, V., Moir, M., Nussbaum, D., Olszewski, M.: Simplifying concurrent algorithms by exploiting hardware TM. In: Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 325–334 (2010)

    Chapter  Google Scholar 

  8. Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: Proceedings of the 20th International Symposium on Distributed Computing (DISC), pp. 194–208 (2006)

    Google Scholar 

  9. Dice, D., Shavit, N.: TLRW: return of the read-write lock. In: Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 284–293 (2010)

    Chapter  Google Scholar 

  10. Diestelhorst, S., Hohmuth, M., Pohlack, M.: Sane semantics of best effort hardware transactional memory. In: 2nd Workshop on the Theory of Transactional Memory (WTTM), September (2010)

    Google Scholar 

  11. Ennals, R.: Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report (2006)

  12. Fernandes, S.M., Cachopo, J.P.: Lock-free and scalable multi-version software transactional memory. In: Proceedings of the 16th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPOPP), pp. 179–188 (2011)

    Google Scholar 

  13. Gramoli, V., Harmanci, D., Felber, P.: Towards a theory of input acceptance for transactional memories. In: Proceedings of the 12th International Conference on Principles of Distributed Systems (OPODIS), pp. 527–533 (2008)

    Google Scholar 

  14. Guerraoui, R., Henzinger, T.A., Kapalka, M., Singh, V.: Transactions in the jungle. In: Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 263–272 (2010)

    Chapter  Google Scholar 

  15. Guerraoui, R., Henzinger, T.A., Singh, V.: Permissiveness in transactional memories. In: Proceedings of the 22nd International Symposium on Distributed Computing (DISC), pp. 305–319 (2008)

    Google Scholar 

  16. Guerraoui, R., Kapałka, M.: On obstruction-free transactions. In: Proceedings of the 20th Annual Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 304–313 (2008)

    Chapter  Google Scholar 

  17. Guerraoui, R., Kapałka, M.: The semantics of progress in lock-based transactional memory. In: Proceedings of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 404–415 (2009)

    Google Scholar 

  18. Herlihy, M., Luchangco, V., Moir, M., Scherer, W.N., III: Software transactional memory for dynamic-sized data structures. In: Proceedings of the 22nd Annual ACM Symposium on Principles of Distributed Computing (PODC), pp. 92–101 (2003)

    Google Scholar 

  19. Israeli, A., Rappoport, L.: Disjoint-access-parallel implementations of strong shared memory primitives. In: Proceedings of the 13th Annual ACM Symposium on Principles of Distributed Computing (PODC), pp. 151–160 (1994)

    Google Scholar 

  20. Kapalka, M.: Theory of transactional memory. Ph.D. thesis, EPFL (2010)

  21. Keidar, I., Perelman, D.: On avoiding spare aborts in transactional memory. In: Proceedings of the 21st Annual Symposium on Parallelism in Algorithms and Architectures (SPAA), pp. 59–68 (2009)

    Chapter  Google Scholar 

  22. Lev, Y., Luchangco, V., Marathe, V.J., Moir, M., Nussbaum, D., Olszewski, M.: Anatomy of a scalable software transactional memory. In: 4th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2009)

    Google Scholar 

  23. Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. Theory Comput. Syst. 44(1), 39–66 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  24. Merritt, R.: IBM plants transactional memory in cpu. EETimes (August 2011). http://www.eetimes.com/electronics-news/4218914/IBM-plants-transactional-memory-in-CPU

  25. Napper, J., Alvisi, L.: Lock-free serializable transactions. Technical Report TR-05-04, The University of Texas at Austin (2005)

  26. Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26(4), 631–653 (1979)

    Article  MathSciNet  MATH  Google Scholar 

  27. Perelman, D., Fan, R., Keidar, I.: On maintaining multiple versions in STM. In: Proceeding of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing (PODC), pp. 16–25 (2010)

    Chapter  Google Scholar 

  28. Perelman, D., Keidar, I.: SMV: selective multi-versioning STM. In: 5th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2010)

    Google Scholar 

  29. Reinders, J.: Transactional synchronization in haswell (February 2012). http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/

  30. Riegel, T., Felber, P., Fetzer, C.: A lazy snapshot algorithm with eager validation. In: Proceedings of the 20th International Symposium on Distributed Computing (DISC), pp. 284–298 (2006)

    Google Scholar 

  31. 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: Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP), pp. 187–197 (2006)

    Chapter  Google Scholar 

Download references

Acknowledgements

We thank the anonymous referees for their comments, which helped to improve the paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hagit Attiya.

Additional information

A preliminary version of this paper appeared in ICDCN 2011.

This research is supported in part by the Israel Science Foundation (grants 1344/06 and 1227/10), and by funding from the European Union Seventh Framework Programme (FP7/2007-2013) under grant agreement number 238639, ITN project TRANSFORM.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Attiya, H., Hillel, E. A Single-Version STM that Is Multi-Versioned Permissive. Theory Comput Syst 51, 425–446 (2012). https://doi.org/10.1007/s00224-012-9406-3

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-012-9406-3

Keywords

Navigation