Тёмный

Atomic’s memory orders, what for? - Frank Birbacher [ACCU 2017] 

ACCU Conference
Подписаться 16 тыс.
Просмотров 10 тыс.
50% 1

Multithreading in C++ has been used successfully for many years prior to the introduction of C++ 11 to run programs on multi-core hardware. Then the C++ 11 Memory Model for multithreading was introduced with much debate as to its proper application. On the one hand some suggest not to bother with atomics and just use volatile if at all. On the other hand some might be happy to have everything guarded with mutexes. Either side may have been discouraged from looking deeper into the C++ 11 Memory Model, put off by its apparent complexity. The talk will focus on different options of “memory order” when using std::atomic. It’ll explain what the memory order is and what each of the options mean. We’ll take a look at the C++ memory model, sequencing of expressions and synchronization between threads. The talk sheds light on compiler optimizations and generated assembly, examines out-of-order execution in CPUs and possible cache communication between cores. In the end it should be clear what an atomic variable does apart from storing a value.

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@MichaelPims
@MichaelPims Год назад
Despite being failed my last job interview on it, I think I would answer much better having looked at this quite clear explanation of memory ordering (hope life will give me a chance) 😊 Thank you! 👍
@arisaif
@arisaif 4 года назад
Unfortunately, a key part of this talk about total order of sequentially consistent operations is unclear when he points to the slides, but they are not visible in the video around 1:15:37.
@ACCUConf
@ACCUConf 4 года назад
Thanks for your comment, it appears some of the annotations are missing from the slides in this video. We have forwarded this message to the speaker, hopefully they can provide you the slides for reference.
@robrick9361
@robrick9361 6 лет назад
If you're going to let people ask questions GIVE THEM A MICROPHONE!
@robrick9361
@robrick9361 6 лет назад
This talk is okay, I would recommend everyone go watch Herb Sutter's 2 part Atomic Weapon talk. Much better and clearer.
@robrick9361
@robrick9361 6 лет назад
39:06-39:42 Both reads and writes cannot be reordered after a release/write or before an acquire/read. |--------------------------------------ACQUIRE-------------------------------------------| In between reads and writes are trapped here. |--------------------------------------RELEASE-------------------------------------------|
Далее
Arvid Norberg: The C++ memory model: an intuition
25:37
CppCon 2015: Paul E. McKenney “C++ Atomics..."
43:04
C++ and Beyond 2012: Herb Sutter - atomic Weapons 1 of 2
1:21:13
Getting up in another processes memory
46:54
Просмотров 15 тыс.