Developing from the surprisingly popular CppCon 2015 tutorial “Racing the filesystem” (https://www.youtube.com/watch?v=uhRWMGBjlO8) on the concurrency fundamentals of the file system, this workshop takes the audience from the fundamental first principles of the file system through to a working and high performance distributed mutual exclusion implementation exclusively using atomic file append messaging based on a modified Maekawa-Suzuki-Kasami distributed voting and mutual consensus algorithm.
Along the way the portable asynchronous file system model supplied by proposed Boost.AFIO will be explained and how such a standardised programming model makes implementing write-once run-anywhere file system algorithms much more tractable. Empirical benchmarks will be shown comparing the scalability of our algorithm to other forms of file system based mutual exclusion such as lock files and byte range locking across Microsoft Windows (NTFS and ReFS), Linux (ext4) and FreeBSD (ZFS). One of the major advantages of our algorithm is that it works perfectly over SMB networked file systems, including mixed POSIX and Microsoft Windows endpoints, and it will be explained how this is not always the case with other mutual exclusion techniques.
With a live demonstration of the working algorithm, the likely audience for this workshop would be similar to that for lock free programming using memory atomics, however the file system exposes a much richer suite of fundamental primitive operations – and unexpected surprises!