Loading…
CppCon 2016 has ended
Thursday, September 22 • 2:00pm - 3:00pm
Better mutual exclusion on the filesystem using Boost.AFIO (asynchronous file and filesystem)

Log in to save this to your schedule, view media, leave feedback and see who's attending!

This is the third and likely final part of a surprisingly popular "from first principles" series of beginner's workshops based on developing the v2 post-peer-review rewrite of proposed Boost.AFIO, a C++ library wrapping the advanced features of the filesystem intended for eventual ISO C++ standardisation. If you're the kind of library developer who likes building unusual low level concurrent algorithms using the very latest C++ 14-17 (proposed) features and testing them for time and space complexities, this is definitely your kind of talk.

At CppCon 2015 we studied the concurrency fundamentals of the filing system, and how it can have the acquire/release semantics of memory atomics but also differs in many ways from memory. At ACCU 2016, using those fundamentals we built from first principles a novel distributed mutual exclusion implementation boost::afio::algorithm::atomic_append which doesn't suffer from the "scalability holes" found in the OS kernel provided facilities boost::afio::algorithm::byte_ranges and boost::afio::algorithm::lock_files. At this third workshop we shall continue the "from first principles" theme by building a fourth and probably last distributed mutual exclusion algorithm for the AFIO algorithms library boost::afio::algorithm, with this one making use of shared memory maps for superior performance when only a single machine is doing the locking.

Is it possible to portably detect the arrival of a networked drive user (SMB, NFS) and safely disable using shared memory maps such that we can automatically race free downgrade our implementation to a networked drive compatible technique?

It turns out that the answer is yes. It has superb performance and scalability, but also comes with many interesting preconditions, tradeoffs and caveats, the most important being that this is an anti-social mutual exclusion algorithm.

Slides: This is a live link to the slides in progress. Expect them to change up right up until the workshop is given.

These are the slides and video for the ACCU 2016 workshop on the atomic append locking algorithm, and the slides and video for the CppCon 2015 workshop on the concurrency fundamentals of the file system. Both were surprisingly well attended, indeed the former was the most attended talk of its track for some reason where it received 18 green votes, zero yellow and zero red votes.

Speakers
avatar for Niall Douglas

Niall Douglas

Consultant, ned Productions Ltd
Niall Douglas is a lead author of WiP Boost.AFIO v2, Boost.Outcome, Boost.KernelTest and Boost-lite. He has been the lead Google Summer of Code administrator for Boost since 2014. He is an Affiliate Researcher with the Waterloo Research Institute for Complexity and Innovation at the... Read More →


Thursday September 22, 2016 2:00pm - 3:00pm PDT
Frey (Room 406) Meydenbauer Center