Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP

HP Labs home

Technical reports

» 

HP Labs

» Research
» News and events
» Technical reports
» About HP Labs
» Careers @ HP Labs
» People
» Worldwide sites
» Downloads
Content starts here

 
Click here for full text: PDF

Foundations of the C++ Concurrency Memory Model

Boehm, Hans-J; Adve, Sarita V.

HPL-2008-56

Keyword(s): memory consistency, memory model, sequential consistency, C++, trylock, data race

Abstract: Currently multi-threaded C or C++ programs combine a single-threaded programming language with a separate threads library. This is not entirely sound. We describe an effort, currently nearing completion, to address these issues by explicitly providing semantics for threads in the next revision of the C++ standard. Our approach is similar to that recently followed by Java, in that, at least for a well defined and interesting subset of the language, we give sequentially consistent semantics to programs that do not contain data races. Nonetheless, a number of our decisions are often surprising even to those familiar with the Java effort: * We (mostly) insist on sequential consistency for race-free programs, in spite of implementation issues that came to light after the Java work. * We give no semantics to programs with data races. There are no benign C++ data races. * We use weaker semantics for trylock than existing languages or libraries, allowing us to promise sequential consistency with an intuitive race definition, even for programs with trylock. This paper describes the simple model we would like to be able to provide for C++ threads programmers, and explain how this, together with some practical, but often under- appreciated implementation constraints, drives us towards the above decisions. Publication Info: To Be presented and published in Programming Language Design and Implementation (PLDI) 2008, Tucson, AZ, June 2008

11 Pages

Back to Index

»Technical Reports

» 2009
» 2008
» 2007
» 2006
» 2005
» 2004
» 2003
» 2002
» 2001
» 2000
» 1990 - 1999

Heritage Technical Reports

» Compaq & DEC Technical Reports
» Tandem Technical Reports
Printable version
Privacy statement Using this site means you accept its terms Feedback to HP Labs
© 2009 Hewlett-Packard Development Company, L.P.