In my short yet dynamic career, I’ve had the pleasure - and genuine fun - of diving into the depths of madness alongside databases, programming languages, and distributed systems. However, it was concurrency that once and for all stripped me of my illusions, plunging me into trauma and doubt.
As programmers, we live in the delusion that code executes exactly as we see it on our screens. We forget that everything lies: processors, compilers, libraries, and even our mental models.
The goal of this talk is to introduce you to the world of concurrent programming - a world you practice every day, whether you realize it or not.
We’ll start by defining the problem: why concurrency is used to scare junior developers, and why most issues stem from the fact that hardly anyone remembers how processors actually work anymore.
We’ll talk about consistency and cache coherence, memory hierarchy, as well as liveness, mutual exclusion, and atomic operations. We’ll explore the limitations of the dominant lock-based model and look at alternative programming paradigms. We’ll dig into why memory models help us maintain our sanity - and why sequential consistency is the model adopted by most programming languages.
I hope this talk will serve as a gentle introduction to the fascinating world of concurrency, which is, in fact, key to ensuring the performance of our systems.