Skip to main content

Conflict Abstractions and Shadow Speculation for Optimistic Transactional Objects

  • Conference paper
  • First Online:
Programming Languages and Systems (APLAS 2019)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 11893))

Included in the following conference series:

  • 545 Accesses

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.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 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. 2.

    www.github.com/ScalaProust/ScalaProust/.

  3. 3.

    https://aws.amazon.com/blogs/aws/the-new-m4-instance-type-bonus-price-reduction-on-m3-c4/.

  4. 4.

    We did not vary key range as in the predication paper, as garbage collection was not a focus of this implementation.

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

  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_7

    Chapter  Google Scholar 

  2. Bernstein, A.: Analysis of programs for parallel processing. IEEE Trans. Electron. Comput. 15(5), 757–763 (1966)

    Article  Google Scholar 

  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. 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. Bronson, N.G., Chafi, H., Olukotun, K.: CCSTM: a library-based STM for scala. def 9 (2010). 10

    Google Scholar 

  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. Dickerson, T.D.: Fast snapshottable concurrent braun heaps. arXiv preprint arXiv:1705.06271 (2017)

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

    Chapter  Google Scholar 

  12. Fiat, A., Kaplan, H.: Making data structures confluently persistent. J. Algorithms 48, 1 (2003). 12th ACM-SIAM Symposium on Discrete Algorithms

    Google Scholar 

  13. Golan-Gueta, G., Ramalingam, G., Sagiv, M., Yahav, E.: Automatic semantic locking. SIGPLAN Not. 49(8), 385–386 (2014)

    Article  Google Scholar 

  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. Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991)

    Article  Google Scholar 

  16. Herlihy, M.: A methodology for implementing highly concurrent data objects. ACM Trans. Program. Lang. Syst. (TOPLAS) 15(5), 745–770 (1993)

    Article  Google Scholar 

  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. 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. 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. Korth, H.F.: Locking primitives in a database system. J. ACM 30, 1 (1983)

    Article  MathSciNet  Google Scholar 

  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. 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. 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. Kulkarni, M., Pingali, K., Walter, B., Ramanarayanan, G., Bala, K., Chew, L.P.: Optimistic parallelism requires abstractions. Commun. ACM 52(9), 89–97 (2009)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  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. Prokopec, A., Bronson, N.G., Bagwell, P., Odersky, M.: Concurrent tries with efficient non-blocking snapshots, pp. 151–160

    Article  Google Scholar 

  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_29

    Chapter  MATH  Google Scholar 

  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)

    Article  Google Scholar 

  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. Weihl, W.: Commutativity-based concurrency control for abstract data types. IEEE Trans. Comput. 37(12), 1488–1505 (1988)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eric Koskinen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics