Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1519065.1519094acmconferencesArticle/Chapter ViewAbstractPublication PageseurosysConference Proceedingsconference-collections
research-article

A runtime system for software lock elision

Published: 01 April 2009 Publication History

Abstract

The advent of multi-core processors means that exploiting parallelism is key to increasing the performance of programs. Many researchers have studied the use of atomic blocks as a way to simplify the construction of scalable parallel programs. However, there is a large body of existing lock-based code, and typically it is incorrect to simply replace lock-based critical sections with atomic blocks. Some problems include the need to do IO within critical sections; the use of primitives such as condition variables; and the sometime reliance on underlying lock properties such as fairness or priority inheritance.
In this paper we investigate an alternative: a software runtime system that allows threads to speculatively execute lock-based critical sections in parallel. Execution proceeds optimistically, dynamically detecting conflicts between accesses by concurrent threads. However, if there are frequent conflicts, or if there are attempts to perform operations that cannot be done speculatively, then execution can fall back to acquiring a lock. Conversely, implementations of atomic blocks must typically serialise all operations that cannot be performed speculatively.
Our runtime system has been designed with the requirements of systems code in mind: in particular it does not require that programs be written in type-safe languages, nor does it require any form of garbage collection. Furthermore, we never require a thread holding a lock to wait for a thread that has speculatively acquired it. This lets us retain any useful underlying properties of a given lock implementation, e.g. fairness or priority inheritance.

References

[1]
Martin Abadi, Andrew Birrell, Tim Harris, and Michael Isard. Semantics of transactional memory and automatic mutual exclusion. In POPL '08, 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 63--74, January 2008.
[2]
Martin Abadi, Tim Harris, and Mojtaba Mehrara. Transactional memory with strong atomicity using off-the-shelf memory protection hardware. In PPoPP '09, 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, February 2009.
[3]
Robert D. Blumofe, Christopher F. Joerg, Bradley C. Kuszmaul, Charles E. Leiserson, Keith H. Randall, and Yuli Zhou. Cilk: An efficient multithreaded runtime system. Technical Report MIT-LCS-TM-548, 1995.
[4]
Hans-J. Boehm and Sarita V. Adve. Foundations of the C concurrency memory model. In PLDI '08: Proc. 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 68--78, June 2008.
[5]
Chi Cao Minh, JaeWoong Chung, Christos Kozyrakis, and Kunle Olukotun. STAMP: Stanford transactional applications for multi-processing. In IISWC '08: Proc. IEEE International Symposium on Workload Characterization, pages 35--46, September 2008.
[6]
Dave Dice, Ori Shalev, and Nir Shavit. Transactional locking II. In DISC '06: Proc. 20th International Symposium on Distributed Computing, pages 194--208, September 2006.
[7]
Keir Fraser. Practical lock freedom. PhD thesis, Cambridge University Computer Laboratory, 2003. Also available as Technical Report UCAM-CL-TR-579.
[8]
Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA '03: Proc. 18th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 388--402, November 2003.
[9]
Tim Harris and Keir Fraser. Revocable locks for non-blocking programming. In PPoPP '05: Proc. 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 72--82, June 2005.
[10]
Maurice Herlihy, Victor Luchangco, Mark Moir, and William N. Scherer, III. Software transactional memory for dynamic-sized data structures. In PODC '03: Proc. 22nd ACM Symposium on Principles of Distributed Computing, pages 92--101, July 2003.
[11]
Amos Israeli and Lihu Rappoport. Disjoint-access-parallel implementations of strong shared memory primitives. In PODC '94: Proc. 13th ACM Symposium on Principles of Distributed Computing, pages 151--160, August 1994.
[12]
H. T. Kung and Philip L. Lehman. Concurrent manipulation of binary search trees. ACM Trans. Database Syst., 5 (3): 354--382, 1980.
[13]
Jim Larus and Ravi Rajwar. Transactional Memory. Morgan & Claypool Publishers, 2007.
[14]
Virendra J. Marathe and Mark Moir. Toward high performance nonblocking software transactional memory. In PPoPP '08: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, pages 227--236, New York, NY, USA, February 2008.
[15]
Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer, III, and Michael L. Scott. Lowering the overhead of software transactional memory. Technical Report TR 893, Computer Science Department, University of Rochester, March 2006.
[16]
Vijay Menon, Steven Balensiefer, Tatiana Shpeisman, Ali-Reza Adl-Tabatabai, Richard Hudson, Bratin Saha, and Adam Welc. Single global lock semantics in a weakly atomic S™. In TRANSACT '08, 3rd ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, February 2008.
[17]
Vijay Menon, Steven Balensiefer, Tatiana Shpeisman, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Bratin Saha, and Adam Welc. Towards a lock-based semantics for Java S™. Technical Report UW-CSE-07-11-01, University of Washington, Nov 2007.
[18]
Maged M. Michael. Hazard pointers: Safe memory reclamation for lock-free objects. IEEE Trans. Parallel Distrib. Syst., 15 (6): 491--504, 2004.
[19]
Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill, and David A. Wood. Log™: Log-based transactional memory. In Proc. 12th International Symposium on High-Performance Computer Architecture, pages 254--265. February 2006.
[20]
Marek Olszewski, Jeremy Cutler, and J. Gregory Steffan. JudoS™: A dynamic binary-rewriting approach to software transactional memory. In PACT '07: Proc. 16th International Conference on Parallel Architecture and Compilation Techniques, pages 365--375, September 2007.
[21]
Ravi Rajwar and James R. Goodman. Speculative lock elision: enabling highly concurrent multithreaded execution. In MICRO '01: Proc. 34th ACM/IEEE International Symposium on Microarchitecture, pages 294--305, December 2001.
[22]
Torvald Riegel and Diogo Becker de Brum. Making object-based S™ practical in unmanaged environments. In TRANSACT '08, 3rd ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, February 2008.
[23]
Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E. Ramadan, Bhandari Aditya, and Emmett Witchel. TxLinux: using and managing hardware transactional memory in an operating system. In SOSP '07: Proc. 21st ACM SIGOPS Symposium on Operating Systems Principles, pages 87--102, October 2007.
[24]
Amitabha Roy, Steven Hand, and Tim Harris. Exploring the Limits of Disjoint Access Parallelism. In Proceedings of HotPar '09: 1st USENIX Workshop on Hot Topics in Parallelism (to appear), March 2009.
[25]
Yannis Smaragdakis, Anthony Kay, Reimer Behrends, and Michal Young. General and efficient locking without blocking. In MSPC '08: Proc. 2008 ACM SIGPLAN workshop on Memory Systems Performance and Correctness, pages 1--5, March 2008.
[26]
Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott. Privatization techniques for software transactional memory. Technical Report TR 915, Computer Science Department, University of Rochester, February 2007.
[27]
Michael F. Spear, Maged M. Michael, and Michael L. Scott. Inevitability mechanisms for software transactional memory. In TRANSACT '08: Proc 3rd ACM SIGPLAN Workshop on Transactional Computing. February 2008.
[28]
Cheng Wang, Wei-Yu Chen, Youfeng Wu, Bratin Saha, and Ali-Reza Adl-Tabatabai. Code generation and optimization for transactional memory constructs in an unmanaged language. In CGO '07: Proc. 2007 International Symposium on Code Generation and Optimization, pages 34--48, March 2007.
[29]
Yin Wang, Terence Kelly, Manjunath Kudlur, Stéphane Lafortune, and Scott A. Mahlke. Gadara: Dynamic deadlock avoidance for multithreaded programs. In OSDI '08: Proceedings of the 8th USENIX Symposium on Operating Systems Design and Implementation, pages 281--294, 2008.
[30]
Adam Welc, Bratin Saha, and Ali-Reza Adl-Tabatabai. Irrevocable transactions and their applications. In SPAA '08: Proc. 20th Symposium on Parallelism in Algorithms and Architectures, pages 285--296, June 2008.
[31]
Lukasz Ziarek, Adam Welc, Ali-Reza Adl-Tabatabai, Vijay Menon, Tatiana Shpeisman, and Suresh Jagannathan. A uniform transactional execution environment for Java. In ECOOP '08: Proc. 22nd European Conference on Object-Oriented Programming, pages 129--154, July 2008.

Cited By

View all
  • (2023)Separating Mechanism from Policy in STM2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT58117.2023.00031(279-296)Online publication date: 21-Oct-2023
  • (2018)Pinpointing and repairing performance bottlenecks in concurrent programsEmpirical Software Engineering10.1007/s10664-017-9578-123:5(3034-3071)Online publication date: 1-Oct-2018
  • (2017)Legato: end-to-end bounded region serializability using commodity hardware transactional memoryProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049834(1-13)Online publication date: 4-Feb-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
EuroSys '09: Proceedings of the 4th ACM European conference on Computer systems
April 2009
342 pages
ISBN:9781605584829
DOI:10.1145/1519065
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 April 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. revocable locks
  2. software transactional memory
  3. speculative lock elision
  4. unmanaged environments

Qualifiers

  • Research-article

Conference

EuroSys '09
Sponsor:
EuroSys '09: Fourth EuroSys Conference 2009
April 1 - 3, 2009
Nuremberg, Germany

Acceptance Rates

Overall Acceptance Rate 241 of 1,308 submissions, 18%

Upcoming Conference

EuroSys '25
Twentieth European Conference on Computer Systems
March 30 - April 3, 2025
Rotterdam , Netherlands

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)1
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Separating Mechanism from Policy in STM2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT)10.1109/PACT58117.2023.00031(279-296)Online publication date: 21-Oct-2023
  • (2018)Pinpointing and repairing performance bottlenecks in concurrent programsEmpirical Software Engineering10.1007/s10664-017-9578-123:5(3034-3071)Online publication date: 1-Oct-2018
  • (2017)Legato: end-to-end bounded region serializability using commodity hardware transactional memoryProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049834(1-13)Online publication date: 4-Feb-2017
  • (2017)Exploiting the Parallelism Between Conflicting Critical Sections with Partial ReversionIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2017.272748528:12(3443-3457)Online publication date: 1-Dec-2017
  • (2017)FGSCM: A Fine-Grained Approach to Transactional Lock Elision2017 29th International Symposium on Computer Architecture and High Performance Computing (SBAC-PAD)10.1109/SBAC-PAD.2017.22(113-120)Online publication date: Oct-2017
  • (2017)Legato: End-to-end bounded region serializability using commodity hardware transactional memory2017 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2017.7863724(1-13)Online publication date: Feb-2017
  • (2016)Optimistic concurrency with OPTIKACM SIGPLAN Notices10.1145/3016078.285114651:8(1-12)Online publication date: 27-Feb-2016
  • (2016)Locking Made EasyProceedings of the 17th International Middleware Conference10.1145/2988336.2988357(1-14)Online publication date: 28-Nov-2016
  • (2016)A Survey on Thread-Level Speculation TechniquesACM Computing Surveys10.1145/293836949:2(1-39)Online publication date: 30-Jun-2016
  • (2016)SyncProf: detecting, localizing, and optimizing synchronization bottlenecksProceedings of the 25th International Symposium on Software Testing and Analysis10.1145/2931037.2931070(389-400)Online publication date: 18-Jul-2016
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media