Abstract
Concurrent data structures implemented with software transactional memory (STM) perform poorly when operations which do not conflict in the definition of the abstract data type nonetheless incur conflicts in the concrete state of an implementation. Several works addressed various aspects of this problem, yet we still lack efficient, general-purpose mechanisms that allow one to readily integrate black-box concurrent data-structures into existing STM frameworks.
In this paper we take a step further toward this goal, by focusing on the challenge of how to use black-box concurrent data structures in an optimistic transactional manner, while exploiting an off-the-shelf STM for transaction-level conflict detection. To this end, we introduce two new enabling concepts. First, we define data-structure conflict in terms of commutativity but, unlike prior work, we introduce a new format called conflict abstractions, which is kept separate from the object implementation and is fit for optimistic conflict detection. Second, we describe shadow speculation for wrapping off-the-shelf concurrent objects so that updates can be speculatively and opaquely applied—and even return values observed—but then later dropped (on abort) or else atomically applied (on commit). We have realized these concepts in a new open-source transactional system called ScalaProust, built on top of ScalaSTM and report encouraging experimental results.
Further detail and experimental results can be found in the extended version of this paper [8].
E. Koskinen—Partially supported by NSF Award #1618542.
P. Gazzillo—Partially supported by NSF Awards #1618542 and #1840934.
Brown University—Partially supported by NSF Awards #1561807 and #1908806.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
This name is a portmanteau of predication and boosting, both influential prior works. The name is also an hommage to Marcel Proust, an author famous for his exploration of the complexities of memory.
- 2.
- 3.
- 4.
We did not vary key range as in the predication paper, as garbage collection was not a focus of this implementation.
- 5.
Predication as a technique is specialized to maps and sets, in essence embedding their conflict abstraction as the member elements of the backing collection and allowing frequent updates to the same element to avoid updating the concrete state of the backing data structure.
References
Bansal, K., Koskinen, E., Tripp, O.: Automatic generation of precise and useful commutativity conditions. In: Beyer, D., Huisman, M. (eds.) TACAS 2018. LNCS, vol. 10805, pp. 115–132. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89960-2_7
Bernstein, A.: Analysis of programs for parallel processing. IEEE Trans. Electron. Comput. 15(5), 757–763 (1966)
Bronson, N.G., Casper, J., Chafi, H., Olukotun, K.: A practical concurrent binary search tree. In: Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2010, pp. 257–268. ACM, New York (2010)
Bronson, N.G., Casper, J., Chafi, H., Olukotun, K.: Transactional predication: high-performance concurrent sets and maps for STM. In: Proceedings of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC 2010, pp. 6–15. ACM, New York (2010)
Bronson, N.G., Chafi, H., Olukotun, K.: CCSTM: a library-based STM for scala. def 9 (2010). 10
Carlstrom, B.D., McDonald, A., Carbin, M., Kozyrakis, C., Olukotun, K.: Transactional collection classes. In: Proceedings of the 12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2007, pp. 56–67. ACM, New York (2007)
Dickerson, T.D.: Fast snapshottable concurrent braun heaps. arXiv preprint arXiv:1705.06271 (2017)
Dickerson, T.D., Gazzillo, P., Koskinen, E., Herlihy, M.: Proust: a design space for highly-concurrent transactional data structures. CoRR abs/1702.04866 (2017)
Dimitrov, D., Raychev, V., Vechev, M., Koskinen, E.: Commutativity race detection. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2014, pp. 305–315. ACM (2014)
Ellen, F., Lev, Y., Luchangco, V., Moir, M.: SNZI: scalable nonzero indicators. In: Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Distributed Computing, PODC 2007, pp. 13–22. ACM (2007)
Felber, P., Gramoli, V., Guerraoui, R.: Elastic transactions. In: Keidar, I. (ed.) DISC 2009. LNCS, vol. 5805, pp. 93–107. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04355-0_12
Fiat, A., Kaplan, H.: Making data structures confluently persistent. J. Algorithms 48, 1 (2003). 12th ACM-SIAM Symposium on Discrete Algorithms
Golan-Gueta, G., Ramalingam, G., Sagiv, M., Yahav, E.: Automatic semantic locking. SIGPLAN Not. 49(8), 385–386 (2014)
Hassan, A., Palmieri, R., Ravindran, B.: Optimistic transactional boosting. In: Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2014, pp. 387–388. ACM (2014)
Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)
Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst. (TOPLAS) 15(5), 745–770 (1993)
Herlihy, M., Koskinen, E.: Transactional boosting: a methodology for highly-concurrent transactional objects. In: Proceedings of the 13th ACM SIGPLAN Symposium Principles and Practice of parallel Programming, PPoPP 2008. ACM (2008)
Herman, N., et al.: Type-aware transactions for faster concurrent code. In: Proceedings of the Eleventh European Conference on Computer Systems, EuroSys 2016, pp. 31:1–31:16. ACM, New York (2016)
Kim, D., Rinard, M.C.: Verification of semantic commutativity conditions and inverse operations on linked data structures. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, San Jose, CA, USA, 4–8 June, pp. 528–541 (2011)
Korth, H.F.: Locking primitives in a database system. J. ACM 30, 1 (1983)
Koskinen, E., Parkinson, M., Herlihy, M.: Coarse-grained transactions. In: Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2010), POPL 2010, pp. 19–30. ACM (2010)
Koskinen, E., Parkinson, M.J.: The push/pull model of transactions. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2015). ACM, Portland (2015)
Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.P.: Optimistic parallelism requires abstractions. In: Proceedings of the ACM SIGPLAN 2007 Conference on Programming Language Design and Implementation (PLDI 2007), pp. 211–222 (2007)
Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.P.: Optimistic parallelism requires abstractions. Commun. ACM 52(9), 89–97 (2009)
Ni, Y., et al.: Open nesting in software transactional memory. In: Proceedings of the 12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (2007), PPoPP 2007, pp. 68–78. ACM (2007)
Petrank, E., Timnat, S.: Lock-free data-structure iterators. In: Afek, Y. (ed.) DISC 2013. LNCS, vol. 8205, pp. 224–238. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-41527-2_16
Prokopec, A.: SnapQueue: lock-free queue with constant time snapshots. In: Proceedings of the 6th ACM SIGPLAN Symposium on Scala, SCALA 2015, pp. 1–12. ACM, New York (2015)
Prokopec, A., Bronson, N.G., Bagwell, P., Odersky, M.: Concurrent tries with efficient non-blocking snapshots, pp. 151–160
Shapiro, M., Preguiça, N., Baquero, C., Zawirski, M.: Conflict-free replicated data types. In: Défago, X., Petit, F., Villain, V. (eds.) SSS 2011. LNCS, vol. 6976, pp. 386–400. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24550-3_29
Spiegelman, A., Golan-Gueta, G., Keidar, I.: Transactional data structure libraries. In: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 682–696. ACM (2016)
Steele, Jr., G.L.: Making asynchronous parallelism safe for the world. In: Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1990), pp. 218–231. ACM Press, New York (1990)
Weihl, W.: Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput. 37(12), 1488–1505 (1988)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Dickerson, T., Koskinen, E., Gazzillo, P., Herlihy, M. (2019). Conflict Abstractions and Shadow Speculation for Optimistic Transactional Objects. In: Lin, A. (eds) Programming Languages and Systems. APLAS 2019. Lecture Notes in Computer Science(), vol 11893. Springer, Cham. https://doi.org/10.1007/978-3-030-34175-6_16
Download citation
DOI: https://doi.org/10.1007/978-3-030-34175-6_16
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-34174-9
Online ISBN: 978-3-030-34175-6
eBook Packages: Computer ScienceComputer Science (R0)