Loading Events

« All Events

CSE Colloquium – The C++11 Concurrency Memory Model: Remaining Challenges

October 22 @ 11:00 am
CSE Colloquium - The C++11 Concurrency Memory Model: Remaining Challenges

Presenter: Hans Boehm, Google

Abstract: C++11 extended the language to include threads, defining a concurrency memory model to specify the semantics of shared variables, including “atomic” variables that can be accessed without mutual exclusion. Although this followed Posix threads by more than a decade, and the revision of the Java memory model by a few years, it still helped to resolve some very fundamental points of confusion about the semantics and validity of compiler optimizations in multi-threaded programs. The C definition largely copied it, and several other programming languages and systems, as well as later versions of Java, built on it.

These shared variable semantics provide a clean solution for concurrent programming for which a small amount of extra synchronization-related overhead is acceptable. However, C++ programmers pride themselves in squeezing out the last bit of performance, even if it involves living on the edge. Although the C++ memory model attempts to address those cases, issues remain. In particular, so-called “relaxed” atomics do not have clean semantics, for reasons that appear more and more fundamental. And the discovery that well-motivated hardware characteristics are incompatible with the original model required complicating it. On the other hand, hardware improvements have greatly reduced the need for the now deprecated “memory_order_consume” facility.

We’ll start with an overview of the C++ memory model, and then outline some of the remaining challenges. We’ll give an example to illustrate why “memory_order_relaxed”, which attempts to just expose machine load and store instructions, is inherently much harder to define at the programming language level than it is at the hardware level.

Bio: Hans Boehm works primarily on concurrency issues in the Android platform. He was the initial chair of the ISO C++ Concurrency Study Group, where he led the addition of threads and associated concurrency semantics to the language. He occasionally gets sidetracked into other topics, including work on arithmetic in the Google Calculator app.
Hans is best known as the original primary author of bdwgc, a garbage collector for C. He has published extensively on memory management and concurrent programming. He holds a Ph.D. from Cornell University. He is a former chair of ACM SIGPLAN, an ACM Fellow, and the recipient of the 2020 ACM SIGPLAN Programming Languages Achievement Award.

Hosted by: Professor Mohsen Lesani

Location: Engineering 2, E2-180
*Refreshments such as coffee and pastries will be provided.

Zoom: https://ucsc.zoom.us/j/93445911992?pwd=YkJ2TQtF79h0PcNXbEcpZLbpK0coiY.1&jst=3

Details

Date:
October 22
Time:
11:00 am – 12:15 pm
Event Category:

Venue

Engineering 2
Engineering 2 1156 High Street
Santa Cruz, CA 95064
+ Google Map
Last modified: Oct 22, 2025