Загрузка страницы

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”

http://CppCon.org

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2017

C++11 introduced atomic operations. They allowed C++ programmers to express a lot of control over how memory is used in concurrent programs and made portable lock-free concurrency possible. They also allowed programmers to ask a lot of questions about how memory is used in concurrent programs and made a lot of subtle bugs possible.

This talk analyzes C++ atomic features from two distinct points of view: what do they allow the programmer to express? what do they really do? The programmer always has two audiences: the people who will read the code, and the compilers and machines which will execute it. This distinction is, unfortunately, often missed. For lock-free programming, the difference between the two viewpoints is of particular importance: every time an explicit atomic operation is present, the programmer is saying to the reader of the program "pay attention, something very unusual is going on here." Do we have the tools in the language to precisely describe what is going on and in what way it is unusual? At the same time, the programmer is saying to the compiler and the hardware "this needs to be done exactly as I say, and with maximum efficiency since I went to all this trouble."

This talk starts from the basics, inasmuch as this term can be applied to lock-free programming. We then explore how the C++ lock-free constructs are used to express programmer's intent clearly (and when they get in the way of clarity). Of course, there will be code to look at and to be confused by. At the same time, we never lose track of the fact that the atomics are one of the last resorts of efficiency, and the question of what happens in hardware and how fast does it happen is of paramount importance. Of course, the first rule of performance — "never guess about performance!" — applies, and any claim about speed must be supported by benchmarks.

If you never used C++ atomics but want to learn, this is the talk for you. If you think you know C++ atomics but are unclear on few details, come to fill these few gaps in your knowledge. If you really do know C++ atomics, come to feel good (or to be surprised, and then feel even better).

Fedor Pikus: Mentor Graphics - Siemens business, Chief Scientist

Fedor G Pikus is a Chief Engineering Scientist in the Design to Silicon division of Mentor Graphics Corp. His earlier positions included a Senior Software Engineer at Google and a Chief Software Architect for Calibre PERC, LVS, DFM at Mentor Graphics. He joined Mentor Graphics in 1998 when he made a switch from academic research in computational physics to software industry. His responsibilities as a Chief Scientist include planning long-term technical direction of Calibre products, directing and training the engineers who work on these products, design and architecture of the software, and research in new design and software technologies. Fedor has over 25 patents and over 90 papers and conference presentations on physics, EDA, software design, and C++ language.

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

Видео CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?” канала CppCon
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
10 октября 2017 г. 18:32:49
01:14:22
Другие видео канала
CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon 2017: Matt Godbolt “What Has My Compiler Done for Me Lately? Unbolting the Compiler's Lid”CppCon 2017: Fedor Pikus “Read, Copy, Update, then what? RCU for non-kernel programmers”CppCon 2017: Fedor Pikus “Read, Copy, Update, then what? RCU for non-kernel programmers”CppCon 2018: Jonathan Boccara “105 STL Algorithms in Less Than an Hour”CppCon 2018: Jonathan Boccara “105 STL Algorithms in Less Than an Hour”CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"CppCon 2019: Bjarne Stroustrup “C++20: C++ at 40”CppCon 2019: Bjarne Stroustrup “C++20: C++ at 40”CppCon 2018: Jefferson Amstutz “Compute More in Less Time Using C++ Simd Wrapper Libraries”CppCon 2018: Jefferson Amstutz “Compute More in Less Time Using C++ Simd Wrapper Libraries”CppCon 2015: Michael Wong “C++11/14/17 atomics and memory model..."CppCon 2015: Michael Wong “C++11/14/17 atomics and memory model..."CppCon 2019: Andrei Alexandrescu “Speed Is Found In The Minds of People"CppCon 2019: Andrei Alexandrescu “Speed Is Found In The Minds of People"CppCon 2017: James McNellis “Everything You Ever Wanted to Know about DLLs”CppCon 2017: James McNellis “Everything You Ever Wanted to Know about DLLs”CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”CppCon 2018: Fedor Pikus “Design for Performance”CppCon 2018: Fedor Pikus “Design for Performance”CppCon 2014: Herb Sutter "Lock-Free Programming (or, Juggling Razor Blades), Part I"CppCon 2014: Herb Sutter "Lock-Free Programming (or, Juggling Razor Blades), Part I"CppCon 2017: Nicolai Josuttis “The Nightmare of Move Semantics for Trivial Classes”CppCon 2017: Nicolai Josuttis “The Nightmare of Move Semantics for Trivial Classes”CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”CppCon 2016: Fedor Pikus “The speed of concurrency (is lock-free faster?)"CppCon 2016: Fedor Pikus “The speed of concurrency (is lock-free faster?)"Back to Basics: RAII and the Rule of Zero - Arthur O'Dwyer - CppCon 2019Back to Basics: RAII and the Rule of Zero - Arthur O'Dwyer - CppCon 2019CppCon 2018: Matt Godbolt “The Bits Between the Bits: How We Get to main()”CppCon 2018: Matt Godbolt “The Bits Between the Bits: How We Get to main()”CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”
Яндекс.Метрика