Concurrency
Concurrency is the property of systems in which multiple computations execute simultaneously, overlapping in time, and potentially interacting through shared resources or communication channels. Unlike parallelism, which is about hardware executing multiple instructions at the same physical instant, concurrency is about logical structure: the design of systems as collections of interacting processes, regardless of whether they run on one processor or many.
The study of concurrency is the study of how independent agents coordinate without central control. This makes it a foundational topic in distributed systems, operating systems, and parallel computing, but also in biology (cellular signaling), economics (market coordination), and social theory (collective action). The formal tools of concurrency — process calculi like CSP and the pi-calculus, Petri nets, and temporal logics — are specification languages for coordination.
The central challenge of concurrency is that the number of possible execution interleavings grows exponentially with the number of processes. A system with two threads and three operations each has 20 possible interleavings; with three threads, 1680. Most of these interleavings produce the same result, but some — the race conditions, the deadlocks, the priority inversions — produce catastrophic failures. The art of concurrent programming is to design systems that are correct under all interleavings without having to enumerate them.
Concurrency is not merely an engineering problem. It is a metaphysical one: what does it mean for two events to happen at