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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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
Intel Developer Zone: Pause Intrinsic. https://software.intel.com/en-us/node/524249. Accessed 12 Jan 2017
LIKWID GitHub page. https://github.com/RRZE-HPC/likwid/wiki. Accessed 10 Jan 2017
Lock-elided protected object resources on GitHub. https://github.com/bbur/pobj-tsx.git. Accessed 28 Mar 2017
Lock elision anti-patterns. https://software.intel.com/en-us/articles/tsx-anti-patterns-in-lock-elision-code. Accessed 20 Mar 2017
NBAda: non-blocking data structures for Ada Web site. http://www.gidenstam.org/ada/Non-Blocking/. Accessed 20 Jan 2017
Performance application programming interface (PAPI) Web site. http://icl.cs.utk.edu/papi/. Accessed 20 Jan 2017
Simple Components Web site. http://www.dmitry-kazakov.de/ada/components.htm. Accessed 20 Jan 2017
STAMP GitHub page. https://github.com/kozyraki/stamp. Accessed 20 Jan 2017
The GNU C Library is now available. https://lists.gnu.org/archive/html/info-gnu/2013-08/msg00003.html. Accessed 22 Jan 2017
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
Bosch, G.: Lock-free protected types for real-time Ada. Ada Lett. 33(2), 66–74 (2013)
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)
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)
Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco (2008)
Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974)
Intel Corporation: Intel\(^{\textregistered }\) 64 and IA-32 Architectures Software Developer’s Manual, vol. 1, December 2016
Kleen, A.: Scaling existing lock-based applications with lock elision. Queue 12(1), 20: 20–20: 27 (2014)
McCool, M., Reinders, J., Robison, A.: Structured Parallel Programming: Patterns for Efficient Computation. Morgan Kaufmann Publishers Inc., San Francisco (2012)
Michael, M.M.: The balancing act of choosing nonblocking features. Commun. ACM 56(9), 46–53 (2013)
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)
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)
Scott, M.L.: Shared-Memory Synchronization. Synthesis Lectures on Computer Architecture. Morgan & Claypool Publishers, San Francisco (2013)
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)
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)
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)
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)
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)
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
Corresponding author
Editor information
Editors and Affiliations
Rights 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)