The organizers have kindly made sure they can expand the room, so seats are still available. Sorry for the short notice here on this blog.

Using C++ atomics: Lock-Free Algorithms and Data Structures in C++

Here’s one interesting content update: The sessions page lists our talks, including a talk by me with the title “Three Cool Things in C++ Concurrency,” which is pronounced “I hadn’t decided what exactly I wanted to talk about by the time I had to submit the session description.”

I have now decided, and the talk will be entirely 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.)

This talk is about the “how to use them successfully” part of atomics, including:

Best practices and style for using atomic<>s

Three examples, including lock-free mail slots and iterations of a lock-free linked list, all in portable Standard C++

Defining and applying the different levels of “lock-freedom” (wait-free, lock-free, obstruction-free) to develop highly concurrent algorithms and data structures

Demonstrating and solving the ABA problem, with clean and simple code – that’s right, did you know that in C++11 you can solve this without relying on esoterica like double-wide CAS (which isn’t always available) or hazard pointers (which are deeply complex) or garbage collection (which isn’t in the C++ standard… yet)?

A few of you may have seen part of this material in the few times I’ve taught the extended four-day version of my Effective Concurrency course. This version of the material is significantly updated for C++11/14 and also contains new material never before seen even if you did take in the four-day EC course – including that instead of leaving the slist example as a cliffhanger, I present an actual complete solution for the slist example that is (a) correct and (b) can be entirely written using portable Standard C++11. It’s always nice to end with a solution you can actually use, instead of just an open problem cliffhanger…

I’m looking forward to seeing many of you in San Jose in two weeks!

Related

5 Responses

Hi — I am in the area and want to attend. I’m a graduate student. Are your talks free? Are they available streaming? As much as I want to hear you talk, I’m not so capable of paying the high prices for it..

@rhl: Sorry, the organizers charge for admission and we don’t control that. You might ask them if they need volunteers though — there are usually a limited number of slots for people who want to assist with things like handing out handouts and checking badges at the door, that get you free admission in return. That could make sense since you’re local.

I don’t believe the EE organizers are set up to record and/or stream the talks this time. Some conferences do that as a contribution to the C++ community, and I like to make my talks freely available when they are able to do that, but it’s an added cost and effort for equipment etc. and not all events are able to do it.

In recent years as atomics have become more widespread and popularized, numerous learned individuals have blogged or otherwise lectured on their use in the context of lock-free queues. Very few however if any of these introductions ever bother to juxtapose a lock-free queue implementation with a more mundane mutex based queue.

It would be nice to have such a side-by-side exposition, as both have their advantages and disadvantages, and newcomers may not be able to readily distinguish the subtleties between the two.

Will you and Bjarne be able to make your slides/examples available after the seminar? Think it’s some super interesting topics, but as it’s unlikely that a stream/recording will be available it’s pretty unfortunate to live abroad…

In comments, use [code] [/code] for code blocks, and the same with angle brackets for code inside text paragraphs. I appreciate and try to acknowledge feedback on GotW articles; if you're suggesting an improvement for a GotW Solution post, please post under your real name (or include it in the comment text) if you would like to be acknowledged here and when the material is updated and expanded in future Exceptional C++ books. Cancel reply

Enter your comment here...

Fill in your details below or click an icon to log in:

Email (required)(Address never made public)

Name (required)

Website

You are commenting using your WordPress.com account. ( Log Out / Change )