06-09, 10:00–10:50 (EST5EDT), Rocky Linux (BallroomB)
A deep-dive into the fundamentals of concurrency on weakly-ordered memory architectures, building toward implementation of some basic lock-free data structures and their application toward very-low-latency inter-process communication.
The first half hour of this talk will be devoted to the fundamentals of memory architecture on multi-core systems. We'll take an in-depth look at what goes on in your hardware when a load or store instruction executes, the surprising behaviors that can occur on weakly-ordered architectures like ARM and RISC-V, and how the C++ memory model (common to C and Rust) abstracts away platform differences to enable portable code. The next part will introduce Linux syscalls such as mmap
, futex
, and memfd_create
which enable inter-process communication through shared memory, with emphasis on hostile settings and how processes can maintain correct behavior even in the face of incorrect behavior by their peers. Finally, we'll apply our knowledge to implement a lock-free "blackboard" in which multiple readers capture consistent snapshots of a rapidly-changing state structure maintained by a single writer.