~/talk

“Is Parallel Programming still hard? PART 2 of 2”

Talkat CppCon 2017 · 2017-09-24..09-29· [concurrency]
links:none on file
links:none on file
name:M. Wong
links:none on file
slides:none on file

Survey of hardware and algorithms that explains why cachelines, store buffers and speculative execution force specific code choices and shows concrete tradeoffs: classic Lamport ring vs per-slot atomics and Giacomoni’s variant, a futex-based blocking variant, and a TLS reader-writer that eliminates cross-thread cache misses. Measurements show a simple global-lock gives about 4.3 million handoffs/sec on one socket, per-slot atomics and alignment double throughput, and designs using per-object atomics or queued locks (MCS) reduce bouncing at the cost of complexity and worse writer latency.

AI-written summary · about

  1. 0:00Introduction
  2. 0:24Hardware loopholes in physics
  3. 3:37Locality in parallel computing
  4. 3:59Hardware optimizations overview
  5. 4:41Big cachelines trade-offs
  6. 6:45False sharing and alignment
  7. 7:26Cache prefetching pitfalls
  8. 8:28Store buffers and memory ordering
  9. 11:50C++ memory model benefits
  10. 12:54Big caches and speculative execution
  11. 14:41Speculative execution downsides
  12. 15:43Message passing example
  13. 17:12Hardware visibility advantages
  14. 17:33Locking basics and issues
  15. 19:42Cacheline contention in locks
  16. 20:44Queued locks for scalability
  17. 21:46Adaptive spin/sleep strategies
  18. 22:53Reader-writer lock problems
  19. 24:39Thread-local reader-writer lock
  20. 26:04Transition to single-producer single-consumer
  21. 26:56Buffer design goals and trade-offs
  22. 27:38Single-lock implementation issues
  23. 29:28Lamport algorithm advantages
  24. 31:44Giacomoni algorithm improvements
  25. 33:54False sharing alignment impact
  26. 35:05Blocking consumer requirements
  27. 36:10Futex and blocking performance
  28. 38:01Three-value state algorithm
  29. 41:23Blocking vs non-blocking trade-offs
  30. 41:44Talk summary and lessons
  31. 42:51Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.