Skip to main content

Lock Elision for Protected Objects Using Intel Transactional Synchronization Extensions

  • Conference paper
  • First Online:
Reliable Software Technologies – Ada-Europe 2017 (Ada-Europe 2017)

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

Included in the following conference series:

  • 593 Accesses

Abstract

Lock elision is a technique to replace coarse-grained locks by optimistic concurrent execution. In this paper, we introduce lock elision for protected objects (POs) in Ada. We employ Intel Transactional Synchronization Extensions (TSX) as the underlying hardware transactional memory facility. With TSX, a processor can detect dynamically whether tasks need to serialize through critical sections protected by locks. We adapt the GNU Ada run-time library (GNARL) to elide locks transparently from protected functions and procedures. We critically evaluate opportunities and difficulties of lock elision with protected entries. We demonstrate that lock elision can achieve significant performance improvements for a selection of three synthetic and one real-world benchmark. We show the scalability of our approach for up to 44 cores of a two-CPU, 44-core Intel E5-2699 v4 system.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. ACAA Web site on “Concurrent access to Ada container libraries”. http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0196-1.txt?rev=1.4. Accessed 20 Jan 2017

  2. Intel Developer Zone: Pause Intrinsic. https://software.intel.com/en-us/node/524249. Accessed 12 Jan 2017

  3. LIKWID GitHub page. https://github.com/RRZE-HPC/likwid/wiki. Accessed 10 Jan 2017

  4. Lock-elided protected object resources on GitHub. https://github.com/bbur/pobj-tsx.git. Accessed 28 Mar 2017

  5. Lock elision anti-patterns. https://software.intel.com/en-us/articles/tsx-anti-patterns-in-lock-elision-code. Accessed 20 Mar 2017

  6. NBAda: non-blocking data structures for Ada Web site. http://www.gidenstam.org/ada/Non-Blocking/. Accessed 20 Jan 2017

  7. Performance application programming interface (PAPI) Web site. http://icl.cs.utk.edu/papi/. Accessed 20 Jan 2017

  8. Simple Components Web site. http://www.dmitry-kazakov.de/ada/components.htm. Accessed 20 Jan 2017

  9. STAMP GitHub page. https://github.com/kozyraki/stamp. Accessed 20 Jan 2017

  10. The GNU C Library is now available. https://lists.gnu.org/archive/html/info-gnu/2013-08/msg00003.html. Accessed 22 Jan 2017

  11. The world’s simplest lock-free hash table, Preshing on programming blog. http://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table/. Accessed 22 Jan 2017

  12. Bosch, G.: Lock-free protected types for real-time Ada. Ada Lett. 33(2), 66–74 (2013)

    Article  Google Scholar 

  13. Dice, D., Lev, Y., Moir, M., Nussbaum, D.: Early experience with a commercial hardware transactional memory implementation. In: Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS XIV), pp. 157–168. ACM, New York (2009)

    Google Scholar 

  14. Herlihy, M., Moss, J.E.B.: Transactional memory: architectural support for lock-free data structures. In: Proceedings of the 20th Annual International Symposium on Computer Architecture (ISCA 1993), pp. 289–300. ACM, New York (1993)

    Google Scholar 

  15. Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco (2008)

    Google Scholar 

  16. Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974)

    Article  MATH  Google Scholar 

  17. Intel Corporation: Intel\(^{\textregistered }\) 64 and IA-32 Architectures Software Developer’s Manual, vol. 1, December 2016

    Google Scholar 

  18. Kleen, A.: Scaling existing lock-based applications with lock elision. Queue 12(1), 20: 20–20: 27 (2014)

    Google Scholar 

  19. McCool, M., Reinders, J., Robison, A.: Structured Parallel Programming: Patterns for Efficient Computation. Morgan Kaufmann Publishers Inc., San Francisco (2012)

    Google Scholar 

  20. Michael, M.M.: The balancing act of choosing nonblocking features. Commun. ACM 56(9), 46–53 (2013)

    Article  Google Scholar 

  21. Minh, C.C., Chung, J., Kozyrakis, C., Olukotun, K.: STAMP: Stanford transactional applications for multi-processing. In: 4th International Symposium on Workload Characterization (IISWC 2008), Seattle, Washington, USA, 14–16 September, 2008, pp. 35–46 (2008)

    Google Scholar 

  22. Rajwar, R., Goodman, J.R.: Speculative lock elision: enabling highly concurrent multithreaded execution. In: Proceedings of the 34th Annual ACM/IEEE International Symposium on Microarchitecture (MICRO 34), pp. 294–305. IEEE Computer Society (2001)

    Google Scholar 

  23. Scott, M.L.: Shared-Memory Synchronization. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, San Francisco (2013)

    Google Scholar 

  24. Taft, S.T., Duff, R.A., Brukardt, R.L., Ploedereder, E., Leroy, P., Schonberg, E. (eds.): Ada 2012 Reference Manual. Language and Standard Libraries. LNCS, vol. 8339. Springer, Heidelberg (2013)

    Google Scholar 

  25. Terpstra, D., Jagode, H., You, H., Dongarra, J.: Collecting performance data with PAPI-C. In: Müller, M.S., Resch, M.M., Schulz, A., Nagel, W.E. (eds.) Tools for High Performance Computing 2009. Springer, Heidelberg (2010)

    Google Scholar 

  26. Treibig, J., Hager, G., Wellein, G.: LIKWID: a lightweight performance-oriented tool suite for x86 multicore environments. In: Proceedings of PSTI2010, The First International Workshop on Parallel Software Tools and Tool Infrastructures, San Diego, CA (2010)

    Google Scholar 

  27. Wang, A., Gaudet, M., Wu, P., Amaral, J.N., Ohmacht, M., Barton, C., Silvera, R., Michael, M.: Evaluation of Blue Gene/Q hardware support for transactional memories. In: Proceedings of the 21st International Conference on Parallel Architectures and Compilation Techniques (PACT 2012), pp. 127–136. ACM, New York (2012)

    Google Scholar 

  28. Yoo, R.M., Hughes, C.J., Lai, K., Rajwar, R.: Performance evaluation of Intel transactional synchronization extensions for high-performance computing. In: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis (SC 2013), pp. 19:1–19:11. ACM, New York (2013)

    Google Scholar 

Download references

Acknowledgements

Research supported by the Next-Generation Information Computing Development Program through the National Research Foundation of Korea (NRF), funded by the Ministry of Science, ICT & Future Planning under grant NRF2015M3C4A7065522.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bernd Burgstaller .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Jeong, S., Yang, S., Burgstaller, B. (2017). Lock Elision for Protected Objects Using Intel Transactional Synchronization Extensions. In: Blieberger, J., Bader, M. (eds) Reliable Software Technologies – Ada-Europe 2017. Ada-Europe 2017. Lecture Notes in Computer Science(), vol 10300. Springer, Cham. https://doi.org/10.1007/978-3-319-60588-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-60588-3_8

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-60587-6

  • Online ISBN: 978-3-319-60588-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics