Loading…
CppCon 2021 has ended
Wednesday, October 27 • 7:45am - 8:45am
The Foundation of C++ Atomics: The Knowledge You Need to Correctly Use C++ Atomics.

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
This talk covers all the knowledge you need about atomics to give you a good understanding of how they work under the hood and make sure your code is correct.

C++11 introduced std::atomic template class which supports six memory orderings, writing correct concurrent programs which use the atomic classes can be challenging. It requires understanding the complexity of how std::atomic works under the hood. The goal of this talk is to encourage programmers to use the atomic classes when appropriate and give them the knowledge to do so correctly.

This talk will help you confidently use atomics correctly by bringing knowledge of some of the main components that make parallelism possible in modern computer systems, the relationship between these components, and the individual contribution of each of these components in making atomic difficult to use correctly.

This talk will be aimed at programmers who are new to std::atomic as well as those who have been using these classes. I will show some aspects of atomics which may not be commonly known.

Topics Covered in the firts session :
• A brief overview of atomics in C++.
• Multi-core processors.
• Operating system context switching.
• Memory Consistency and Cache Coherence.
• Memory Barriers.
• The C++ memory model (part 1). 
• Static & Dynamic Instruction Scheduling.


Topics Covered in the second and third session:
• The C++ memory model (part 2).
• Optimizations Allowed by the memory model.
• The Cost of Sequentially Consistent Atomics.
• Semantics of Data Races.
• Compiler and Hardware introduced Data Races.
• The compiler and hardware cooperation to respect the memory model.
• The relationships and tradeoffs among atomics and fences/barriers.
• How atomic map to their expected machine-instruction implementations on x86 architecture . My wish is to be able to do the 1st session this year and do the 2nd and 3rd session next year.


ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Filipe Mulonde

Filipe Mulonde

MSc student, Peter the Great St. Petersburg Polytechnic University
Software Engineer passionate about programming,holds a bachelor's degree in software engineering from Peter the Great St. Petersburg Polytechnic University and is now a final year Master's student in Artificial Intelligence at this same university. worked as a software engineer intern... Read More →


Wednesday October 27, 2021 7:45am - 8:45am MDT
  • Async/Concurrency/Parallelism, Online