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

Performance implications of fence-based memory models

Published: 05 June 2011 Publication History

Abstract

Most mainstream shared-memory parallel programming languages are converging to a memory model, or shared variable semantics, centered on providing sequential consistency for most data-race-free programs.
OpenMP, along with a small number of other languages, defines its memory model in terms of implicit fence (e.g. OpenMP flush) operations that force memory accesses to become visible to other threads in order. Synchronization operations provided by the language implicitly include such fences. In the simplest cases this is equivalent to a promise of sequential consistency for data-race-free programs.
However, real languages typically also provide atomic operations with weak memory ordering constraints, such as the OpenMP atomic directives. These break the above equivalence, making the fence-based model stronger in ways that are observable, but not generally useful. As a result, conventional lock implementations are often accidentally prohibited, adding significant overhead for uncontended locks.
We show that this problem affects both OpenMP and, in a more subtle way, UPC. We have been working with the OpenMP ARB to resolve these issues in future versions of OpenMP.

References

[1]
H.-J. Boehm. Reordering constraints for pthread-style locks. In Proc. 12th Symp. Principles and Practice of Parallel Programming, pages 173--182, 2007.
[2]
H.-J. Boehm and S. Adve. Foundations of the C++ concurrency memory model. In Proc. Conf. on Programming Language Design and Implementation, pages 68--78, 2008.
[3]
G. Bronevetsky and B. R. de Supinski. Complete formal specification of the OpenMP memory model. International Journal of Parallel Programming, 35(4):335--392, August 2007.
[4]
C++ Standards Committee, Pete Becker, ed. Programming Languages - C++ (final committee draft). C++ standards committee paper WG21/N3092=J16/10-0082, http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2010/n3092.pdf, March 2010.
[5]
C Standards Committee (WG14). Committee Draft: Programming Languages --- C. C standards committee paper WG14 N1539, http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1539.pdf, November 2010.
[6]
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, C-28(9):690--691, 1979.
[7]
J. Manson, W. Pugh, and S. Adve. The Java memory model. In Proc. Symp. on Principles of Programming Languages, 2005.
[8]
P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. x86-tso: A rigorous and usable programmer's model for x86 multiprocesors. Communications of the ACM, 53(7):89--97, July 2010.
[9]
The OpenMP ARB. OpenMP application programming interface: Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf, May 2008.
[10]
UPC Consortium. UPC language specifications v1.2. http://upc.gwu.edu/docs/upc_specs_1.2.pdf, May 2005.

Cited By

View all
  • (2016)Persistence programming models for non-volatile memoryACM SIGPLAN Notices10.1145/3241624.292670451:11(55-67)Online publication date: 14-Jun-2016
  • (2016)Persistence programming models for non-volatile memoryProceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management10.1145/2926697.2926704(55-67)Online publication date: 14-Jun-2016
  • (2012)Can seqlocks get along with programming language memory models?Proceedings of the 2012 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness10.1145/2247684.2247688(12-20)Online publication date: 16-Jun-2012

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. OpenMP
  2. atomic operations
  3. critical sections
  4. fences
  5. locks
  6. memory model

Qualifiers

  • Research-article

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)6
  • Downloads (Last 6 weeks)0
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2016)Persistence programming models for non-volatile memoryACM SIGPLAN Notices10.1145/3241624.292670451:11(55-67)Online publication date: 14-Jun-2016
  • (2016)Persistence programming models for non-volatile memoryProceedings of the 2016 ACM SIGPLAN International Symposium on Memory Management10.1145/2926697.2926704(55-67)Online publication date: 14-Jun-2016
  • (2012)Can seqlocks get along with programming language memory models?Proceedings of the 2012 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness10.1145/2247684.2247688(12-20)Online publication date: 16-Jun-2012

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