Advertisement

Conflict Abstractions and Shadow Speculation for Optimistic Transactional Objects

  • Thomas Dickerson
  • Eric KoskinenEmail author
  • Paul Gazzillo
  • Maurice Herlihy
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11893)

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].

References

  1. 1.
    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_7CrossRefGoogle Scholar
  2. 2.
    Bernstein, A.: Analysis of programs for parallel processing. IEEE Trans. Electron. Comput. 15(5), 757–763 (1966)CrossRefGoogle Scholar
  3. 3.
    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)Google Scholar
  4. 4.
    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)Google Scholar
  5. 5.
    Bronson, N.G., Chafi, H., Olukotun, K.: CCSTM: a library-based STM for scala. def 9 (2010). 10Google Scholar
  6. 6.
    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)Google Scholar
  7. 7.
    Dickerson, T.D.: Fast snapshottable concurrent braun heaps. arXiv preprint arXiv:1705.06271 (2017)
  8. 8.
    Dickerson, T.D., Gazzillo, P., Koskinen, E., Herlihy, M.: Proust: a design space for highly-concurrent transactional data structures. CoRR abs/1702.04866 (2017)Google Scholar
  9. 9.
    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)Google Scholar
  10. 10.
    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)Google Scholar
  11. 11.
    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_12CrossRefGoogle Scholar
  12. 12.
    Fiat, A., Kaplan, H.: Making data structures confluently persistent. J. Algorithms 48, 1 (2003). 12th ACM-SIAM Symposium on Discrete AlgorithmsGoogle Scholar
  13. 13.
    Golan-Gueta, G., Ramalingam, G., Sagiv, M., Yahav, E.: Automatic semantic locking. SIGPLAN Not. 49(8), 385–386 (2014)CrossRefGoogle Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)CrossRefGoogle Scholar
  16. 16.
    Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst. (TOPLAS) 15(5), 745–770 (1993)CrossRefGoogle Scholar
  17. 17.
    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)Google Scholar
  18. 18.
    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)Google Scholar
  19. 19.
    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)Google Scholar
  20. 20.
    Korth, H.F.: Locking primitives in a database system. J. ACM 30, 1 (1983)MathSciNetCrossRefGoogle Scholar
  21. 21.
    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)Google Scholar
  22. 22.
    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)Google Scholar
  23. 23.
    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)Google Scholar
  24. 24.
    Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.P.: Optimistic parallelism requires abstractions. Commun. ACM 52(9), 89–97 (2009)CrossRefGoogle Scholar
  25. 25.
    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)Google Scholar
  26. 26.
    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_16CrossRefGoogle Scholar
  27. 27.
    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)Google Scholar
  28. 28.
    Prokopec, A., Bronson, N.G., Bagwell, P., Odersky, M.: Concurrent tries with efficient non-blocking snapshots, pp. 151–160CrossRefGoogle Scholar
  29. 29.
    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_29CrossRefzbMATHGoogle Scholar
  30. 30.
    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)CrossRefGoogle Scholar
  31. 31.
    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)Google Scholar
  32. 32.
    Weihl, W.: Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput. 37(12), 1488–1505 (1988)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Thomas Dickerson
    • 1
  • Eric Koskinen
    • 2
    Email author
  • Paul Gazzillo
    • 3
  • Maurice Herlihy
    • 1
  1. 1.Brown UniversityProvidenceUSA
  2. 2.Stevens Institute of TechnologyHobokenUSA
  3. 3.University of Central FloridaOrlandoUSA

Personalised recommendations