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.
Similar content being viewed by others
Notes
In the full model, read and write operations may also cause a transaction to forcibly abort; however, this does not happen in our algorithms.
This is analogous to the notion of current version of a transactional object in DSTM [18].
References
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)
Attiya, H., Hillel, E.: The cost of privatization. In: Proceedings of the 24th International Conference on Distributed Computing (DISC), pp. 35–49 (2010)
Attiya, H., Hillel, E., Milani, A.: Inherent limitations on disjoint-access parallel implementations of transactional memory. Theory Comput. Syst. 49(4), 698–719 (2011)
Aydonat, U., Abdelrahman, T.: Serializability of transactions in software transactional memory. In: 3rd ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2008)
Cachopo, J.P., Silva, A.R.: Versioned boxes as the basis for memory transactions. Sci. Comput. Program. 63(2), 172–185 (2006)
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)
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)
Dice, D., Shalev, O., Shavit, N.: Transactional locking II. In: Proceedings of the 20th International Symposium on Distributed Computing (DISC), pp. 194–208 (2006)
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)
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)
Ennals, R.: Software transactional memory should not be obstruction-free. Technical Report IRC-TR-06-052, Intel Research Cambridge Tech Report (2006)
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)
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)
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)
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)
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)
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)
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)
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)
Kapalka, M.: Theory of transactional memory. Ph.D. thesis, EPFL (2010)
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)
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)
Luchangco, V., Moir, M., Shavit, N.: Nonblocking k-compare-single-swap. Theory Comput. Syst. 44(1), 39–66 (2009)
Merritt, R.: IBM plants transactional memory in cpu. EETimes (August 2011). http://www.eetimes.com/electronics-news/4218914/IBM-plants-transactional-memory-in-CPU
Napper, J., Alvisi, L.: Lock-free serializable transactions. Technical Report TR-05-04, The University of Texas at Austin (2005)
Papadimitriou, C.H.: The serializability of concurrent database updates. J. ACM 26(4), 631–653 (1979)
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)
Perelman, D., Keidar, I.: SMV: selective multi-versioning STM. In: 5th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT) (2010)
Reinders, J.: Transactional synchronization in haswell (February 2012). http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/
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)
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)
Acknowledgements
We thank the anonymous referees for their comments, which helped to improve the paper.
Author information
Authors and Affiliations
Corresponding author
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
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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00224-012-9406-3