C++ and Beyond 2012: Herb Sutter - atomic> Weapons, 2 of 2
Listen now
Description
Herb Sutter presents atomic> Weapons, 2 of 2. This was filmed at C++ and Beyond 2012. As the title suggests, this is a two part series (given the depth of treatment and complexity of the subject matter). STOP! => Watch part 1 first! Download the slides. Abstract: This session in one word: Deep. It's a session that includes topics I've publicly said for years is Stuff You Shouldn't Need To Know and I Just Won't Teach, but it's becoming achingly clear that people do need to know about it. Achingly, heartbreakingly clear, because some hardware incents you to pull out the big guns to achieve top performance, and C++ programmers just are so addicted to full performance that they'll reach for the big red levers with the flashing warning lights. Since we can't keep people from pulling the big red levers, we'd better document the A to Z of what the levers actually do, so that people don't SCRAM unless they really, really, really meant to. Topics Covered: The facts: The C++11 memory model and what it requires you to do to make sure your code is correct and stays correct. We'll include clear answers to several FAQs: "how do the compiler and hardware cooperate to remember how to respect these rules?", "what is a race condition?", and the ageless one-hand-clapping question "how is a race condition like a debugger?"The tools: The deep interrelationships and fundamental tradeoffs among mutexes, atomics, and fences/barriers. I'll try to convince you why standalone memory barriers are bad, and why barriers should always be associated with a specific load or store.The unspeakables: I'll grudgingly and reluctantly talk about the Thing I Said I'd Never Teach That Programmers Should Never Need To Now: relaxed atomics. Don't use them! If you can avoid it. But here's what you need to know, even though it would be nice if you didn't need to know it.The rapidly-changing hardware reality: How locks and atomics map to hardware i
More Episodes
It's always great to spend some time geeking out with Bart De Smet. As usual, he has a lot of technical details to share and only so much whiteboard real estate. Bart is still deeply engaged with Rx (evolving it, putting it to new uses, making it even more general and capable). How so, you ask?...
Published 09/10/14