Theory of Computing Systems

, Volume 51, Issue 4, pp 425–446 | Cite as

A Single-Version STM that Is Multi-Versioned Permissive

Article

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.

Keywords

Transactional memory Versions Permissiveness Disjoint access parallelism Compare-and-swap k-compare-single-swap Best-effort hardware transactional memory 

Notes

Acknowledgements

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

References

  1. 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. 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. 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) MathSciNetCrossRefGoogle Scholar
  4. 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. 5.
    Cachopo, J.P., Silva, A.R.: Versioned boxes as the basis for memory transactions. Sci. Comput. Program. 63(2), 172–185 (2006) MATHCrossRefGoogle Scholar
  6. 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. 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) CrossRefGoogle Scholar
  8. 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. 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) CrossRefGoogle Scholar
  10. 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. 11.
    Ennals, R.: Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report (2006) Google Scholar
  12. 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. 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. 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) CrossRefGoogle Scholar
  15. 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. 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) CrossRefGoogle Scholar
  17. 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. 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. 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. 20.
    Kapalka, M.: Theory of transactional memory. Ph.D. thesis, EPFL (2010) Google Scholar
  21. 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) CrossRefGoogle Scholar
  22. 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. 23.
    Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. Theory Comput. Syst. 44(1), 39–66 (2009) MathSciNetMATHCrossRefGoogle Scholar
  24. 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. 25.
    Napper, J., Alvisi, L.: Lock-free serializable transactions. Technical Report TR-05-04, The University of Texas at Austin (2005) Google Scholar
  26. 26.
    Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26(4), 631–653 (1979) MathSciNetMATHCrossRefGoogle Scholar
  27. 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) CrossRefGoogle Scholar
  28. 28.
    Perelman, D., Keidar, I.: SMV: selective multi-versioning STM. In: 5th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2010) Google Scholar
  29. 29.
    Reinders, J.: Transactional synchronization in haswell (February 2012). http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/
  30. 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. 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) CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2012

Authors and Affiliations

  1. 1.Department of Computer ScienceTechnionHaifaIsrael
  2. 2.Yahoo! LabsHaifaIsrael

Personalised recommendations