skip to main content
10.1145/1988915.1988922acmconferencesArticle/Chapter ViewAbstractPublication PagesmspConference Proceedingsconference-collections
research-article

Extended sequential reasoning for data-race-free programs

Published: 05 June 2011 Publication History

Abstract

Most multithreaded programming languages prohibit or discourage data races. By avoiding data races, we are guaranteed that variables accessed within a synchronization-free code region cannot be modified by other threads, allowing us to reason about such code regions as though they were single-threaded. However, such single-threaded reasoning is not limited to synchronization-free regions. We present a simple characterization of extended interference-free regions in which variables cannot be modified by other threads.
This characterization shows that, in the absence of data races, important code analysis problems often have surprisingly easy answers. For instance, we can use local analysis to determine when lock and unlock calls refer to the same mutex. Our characterization can be derived from prior work on safe compiler transformations, but it can also be simply derived from first principles, and justified in a very broad context. In addition, systematic reasoning about overlapping interference-free regions yields insight about optimization opportunities that were not previously apparent.
We give preliminary results for a prototype implementation of interference-free regions in the LLVM compiler infrastructure. We also discuss other potential applications for interference-free regions.

References

[1]
S. V. Adve and H.-J. Boehm. Memory models: A case for rethinking parallel languages and hardware. Communications of the ACM, 53(8):90--101, August 2010.
[2]
M. Batty, S. Owens, S. Sarkar, P. Sewell, and T. Weber. Mathematizing C++ concurrency. In ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, 2011.
[3]
H.-J. Boehm and S. V. Adve. Foundations of the C++ concurrency memory model. In ACM SIGPLAN Conference on Programming Language Design and Implementation, 2008.
[4]
C Standards Committee. Programming Languages---C. C standards committee paper WG14/N1539, http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1539.pdf, November 2010.
[5]
C++ Standards Committee, Pete Becker, ed. Working Draft, Standard for Programming Language C++. C++ standards committee paper WG21/N3242=J16/11-0012, http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3242.pdf, February 2011.
[6]
IEEE and The Open Group. IEEE Standard 1003.1-2001. 2001.
[7]
P. Joisha, R. S. Schreiber, P. Banerjee, H.-J. Boehm, and D. R. Chakrabarti. A technique for the effective and automatic reuse of classical compiler optimizations on multithreaded code. In ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, 2011.
[8]
C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on Code Generation and Optimization, 2004.
[9]
J. Manson, W. Pugh, and S. Adve. The Java memory model. In ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, 2005.
[10]
J. Sevcik. Program Transformations in Weak Memory Models. PhD thesis, University of Edinburgh, 2008.
[11]
J. Sevcik and D. Aspinall. On the validity of program transformations in the Java memory model. In European Conference on Object-Oriented Programming, 2008.
[12]
Reference Manual for the Ada Programming Language: ANSI/MIL-STD-1815A-1983 Standard 1003.1-2001. United States Department of Defense, 1983. Springer.
[13]
S. C. Woo, M. Ohara, E. Torrie, J. P. Singh, and A. Gupta. The SPLASH-2 programs: Characterization and methodological considerations. In International Symposium on Computer Architecture, 1995.

Cited By

View all
  • (2020)Sound garbage collection for C using pointer provenanceProceedings of the ACM on Programming Languages10.1145/34282444:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2018)Automatic Detection of Large Extended Data-Race-Free Regions with Conflict IsolationIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2017.277150929:3(527-541)Online publication date: 1-Mar-2018
  • (2017)Automatic detection of extended data-race-free regionsProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049835(14-26)Online publication date: 4-Feb-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MSPC '11: Proceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness
June 2011
74 pages
ISBN:9781450307949
DOI:10.1145/1988915
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: 05 June 2011

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. compiler optimization
  2. concurrency
  3. data races
  4. memory consistency models
  5. sequential reasoning

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '11
Sponsor:

Acceptance Rates

Overall Acceptance Rate 6 of 20 submissions, 30%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2020)Sound garbage collection for C using pointer provenanceProceedings of the ACM on Programming Languages10.1145/34282444:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2018)Automatic Detection of Large Extended Data-Race-Free Regions with Conflict IsolationIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2017.277150929:3(527-541)Online publication date: 1-Mar-2018
  • (2017)Automatic detection of extended data-race-free regionsProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049835(14-26)Online publication date: 4-Feb-2017
  • (2017)BigFoot: static check placement for dynamic race detectionACM SIGPLAN Notices10.1145/3140587.306235052:6(141-156)Online publication date: 14-Jun-2017
  • (2017)BigFoot: static check placement for dynamic race detectionProceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3062341.3062350(141-156)Online publication date: 14-Jun-2017
  • (2017)Automatic detection of extended data-race-free regions2017 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2017.7863725(14-26)Online publication date: Feb-2017
  • (2016)A Hybrid Static-Dynamic Classification for Dual-Consistency Cache CoherenceIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2016.252824127:11(3101-3115)Online publication date: 1-Nov-2016
  • (2015)A Dual-Consistency Cache Coherence ProtocolProceedings of the 2015 IEEE International Parallel and Distributed Processing Symposium10.1109/IPDPS.2015.43(1119-1128)Online publication date: 25-May-2015
  • (2014)Symbolic execution of multithreaded programs from arbitrary program contextsACM SIGPLAN Notices10.1145/2714064.266020049:10(491-506)Online publication date: 15-Oct-2014
  • (2014)Race directed scheduling of concurrent programsACM SIGPLAN Notices10.1145/2692916.255526349:8(301-314)Online publication date: 6-Feb-2014
  • 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