C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2

Channel:alexsmail · Length:1:21:12 · Published:2017-11-06 · Views:71553

Watch on YouTube

Summary

Herb Sutter's deep C++ and Beyond 2012 talk on atomics and the C++ memory model, covering why programmers chasing top performance need to understand hardware ordering. This is part one of two.

Why HN recommends it

HN treats it as the classic go-to for learning atomics and memory ordering, recommended over books.

which are extremely good — HN, 2024

C, C++, Rust, Go & systems languages · Software performance & optimization · Computer architecture & CPUs

Subtitles (excerpt)

so let's now talk about something that is a talk I hoped I would not have to give I did not plan to give until last month when I saw other talks about memory model and Atomics and I know I said there's just got to be information in one place about this including the parts we hope to never to have to teach so over breakfast at our table we were discussing which was more cruel to you to inflict a deep universal references talked on you yesterday right after lunch or to inflict a deep Atomics and memory model talk on you not only first thing in the morning when you barely had the chance to have your first hit of coffee but through the entire morning up to a lunchtime and we decided both were equally cruel so here we go this talk is not only about studio tommix it's about the whole sea fossils memory model but with a focus on instead of tommix because first I want to cover the rules that apply to all kinds of synchronization including mutexes and condition variables and Atomics but then we'll delve specifically into Atomics all the way down into the gory details of the hardware on several popular platforms and architectures to see the reasons why things are the way they are where the hardware is today and how it's moving in flight today so

On Hacker News

"Is Parallel Programming Hard, And, If So, What Can You Do About It?" is one of the best books about atomics and concurrency, and my #2 recommendation. [LINK] My #1 actually isn't a book at all, but the two "atomic Weapons" talks by Herb Sutter, which are extremely good. [VIDEO] [LINK] — chc4, 2024-08
Well written article, nice and to the point. Do recommend. Decades ago I declared myself too stupid to use shared memory with threading; I have learned to avoid this whenever possible, or abstract away the memory access under a safe layer as soon as possible. One of the greatest decisions of my career. Memory model semantics is one of the parts of systems programming that is generally poorly unde… — zevv, 2024-05
For a more in depth introduction to the topic with a lot of practical code examples, I highly recommend Herb Sutter’s excellent talk: Part 1 [VIDEO] Part 2 [LINK] — NobodyNada, 2023-11
If you’re prepared and willing to learn much more about atomic operations than you ever thought you would, there’s no substitute to Herb Sutter’s classic talk ”atomic<> Weapons” from C++ And Beyond 2012 [1]. [1] [VIDEO] — Sharlin, 2020-10
For a somewhat less "for dummies" treatment of the C++ memory model, see Herb Sutter's classic talk "atomic<> Weapons" [1]. [1] [VIDEO] — Sharlin, 2022-08

Related videos