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
. 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
for the ACCU 2016 workshop on the atomic append locking algorithm, and the slides
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.