The Atomic Man: Are lockless data structures REALLY worth learning about?

Started by
9 comments, last by Matt-D 9 years ago

I think this topic is interesting and worth knowing for game development (see Ubisoft examples later).

The good news is that -- if you'd like to learn -- there's now plenty of really good materials available.

I'd start with Herb Sutter's talks: atomic Weapons: The C++ Memory Model and Modern Hardware
http://herbsutter.com/2013/02/11/atomic-weapons-the-c-memory-model-and-modern-hardware/

Then, watch his CppCon 2014 talks, "Lock-Free Programming (or, Juggling Razor Blades)": http://herbsutter.com/2014/10/18/my-cppcon-talks-2/
* Part 1: Lazy initialization with DCL vs. call_once vs. function local statics, and lock-free mailbox algorithms
* Part 2: Lock-free linked lists, the ABA problem, and atomic smart pointers

(Note: "Example-driven talk on how to design and write lock-free algorithms and data structures using C++ atomic -- something that can look deceptively simple, but contains very deep topics. (Important note: This is not the same as my "atomic Weapons" talk; that talk was about the "what they are and why" of the C++ memory model and atomics, and did not cover how to actually use atomics to implement highly concurrent algorithms and data structures.)")

Last but definitely not least, I highly recommend following Jeff Preshing's (a Technical Architect at Ubisoft Montreal) blog: http://preshing.com/

For instance, check out his talk at CppCon 2014: "How Ubisoft Develops Games for Multicore - Before and After C++11"
http://preshing.com/20141024/my-multicore-talk-at-cppcon-2014/

Getting familiar with Boost.Lockfree shouldn't hurt, either:

http://boost.org/libs/lockfree

Good luck!

This topic is closed to new replies.

Advertisement