The Foundation of C++ Atomics: The Knowledge You Need to Correctly Use C++ Atomics – Filipe Mulonde

  • Lobby
  • Science & Technology
  • The Foundation of C++ Atomics: The Knowledge You Need to Correctly Use C++ Atomics – Filipe Mulonde

https://cppcon.org/
https://github.com/CppCon/CppCon2020
---
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 first 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.

---
Filipe Mulonde

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 at JSC NIIAS-Research and Design Institute of Informatization, Automation , and Communication in Railway Transport of the Russian Federation. Doing code review and increase the performance of an autonomous car using parallelism with C++. I am co-founder of APA(Association of Angolan Programmers) a non-profit organization, helping to build a technological bridge between Africa (Angola) and the rest of the world. https://twitter.com/angolan_of/status/1326848737558335488 . I have interests in x86 assembly, Parallel programming, C++,Digital Design, Microarchitecture and Computer Architecture, Computer Organization, OS, memory models, Digital computer Electronics and design of computing devices, compilers, Machine learning, robotics etc. Former mobile and web developer.

---
Videos Streamed & Edited by Digital Medium: http://online.digital-medium.co.uk

The CppCon YouTube Channel Is Sponsored By:
JetBrains : http://jb.gg/cpptools
SonarSource: https://www.sonarsource.com/

Filed under: Science & Technology

No comment yet, add your voice below!


Add a Comment