~/talk

Would 'reserve'/'upgrade'/'downgrade' Methods Improve 'std::shared_mutex'?

Talkat ACCU 2018 · 2018-04-11..04-14· [concurrency, c-and-cpp]
links:none on file
slides:none on file

Implements a competitive reserve/upgrade variant of std::shared_mutex on Linux, runs a microbenchmark that times completed jobs (80th percentile) while sweeping number of threads, percent reads, and lock hold time, and compares against std::mutex and std::shared_mutex. Finds short hold times make plain mutex often faster, the split reserve→upgrade helps when reads dominate (e.g. ~90%+ reads or writes ~10% → noticeable gains), the version that never blocks new readers performs poorly, and downgrade shows little real‑world benefit.

AI-written summary · about

  1. 0:00Intro
  2. 0:12Pre-Introduction: std::shared_mutex
  3. 1:18Recent Scenarios
  4. 3:05std::shared_mutex::lock
  5. 5:08So why is this not part of the C++ Standard?
  6. 7:18Micro-Benchmark
  7. 9:02std::shared_mutex vs. std::mutex
  8. 14:32What happened to downgrade?
  9. 15:07Conclusion
~/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.