Lock Elision for Protected Objects Using Intel Transactional Synchronization Extensions

  • Seongho Jeong
  • Shinhyung Yang
  • Bernd BurgstallerEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10300)


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.


Critical Section Mutual Exclusion Transactional Memory Protected Object Data Conflict 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



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.


  1. 1.
    ACAA Web site on “Concurrent access to Ada container libraries”. Accessed 20 Jan 2017
  2. 2.
    Intel Developer Zone: Pause Intrinsic. Accessed 12 Jan 2017
  3. 3.
    LIKWID GitHub page. Accessed 10 Jan 2017
  4. 4.
    Lock-elided protected object resources on GitHub. Accessed 28 Mar 2017
  5. 5.
  6. 6.
    NBAda: non-blocking data structures for Ada Web site. Accessed 20 Jan 2017
  7. 7.
    Performance application programming interface (PAPI) Web site. Accessed 20 Jan 2017
  8. 8.
    Simple Components Web site. Accessed 20 Jan 2017
  9. 9.
    STAMP GitHub page. Accessed 20 Jan 2017
  10. 10.
    The GNU C Library is now available. Accessed 22 Jan 2017
  11. 11.
    The world’s simplest lock-free hash table, Preshing on programming blog. Accessed 22 Jan 2017
  12. 12.
    Bosch, G.: Lock-free protected types for real-time Ada. Ada Lett. 33(2), 66–74 (2013)CrossRefGoogle Scholar
  13. 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. 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. 15.
    Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco (2008)Google Scholar
  16. 16.
    Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974)CrossRefzbMATHGoogle Scholar
  17. 17.
    Intel Corporation: Intel\(^{\textregistered }\) 64 and IA-32 Architectures Software Developer’s Manual, vol. 1, December 2016Google Scholar
  18. 18.
    Kleen, A.: Scaling existing lock-based applications with lock elision. Queue 12(1), 20: 20–20: 27 (2014)Google Scholar
  19. 19.
    McCool, M., Reinders, J., Robison, A.: Structured Parallel Programming: Patterns for Efficient Computation. Morgan Kaufmann Publishers Inc., San Francisco (2012)Google Scholar
  20. 20.
    Michael, M.M.: The balancing act of choosing nonblocking features. Commun. ACM 56(9), 46–53 (2013)CrossRefGoogle Scholar
  21. 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. 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. 23.
    Scott, M.L.: Shared-Memory Synchronization. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, San Francisco (2013)Google Scholar
  24. 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. 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. 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. 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. 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

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Seongho Jeong
    • 1
  • Shinhyung Yang
    • 1
  • Bernd Burgstaller
    • 1
    Email author
  1. 1.Department of Computer ScienceYonsei UniversitySeoulKorea

Personalised recommendations