What is Concurrency?
The ability of a program to manage multiple tasks that can make progress during overlapping time periods.
Concurrency is about dealing with multiple things at once (structure), while parallelism is about doing multiple things at once (execution). Concurrency models include threads (shared memory), processes (isolated memory), async/await (cooperative), and actors (message passing).
Challenges include race conditions, deadlocks, livelocks, and starvation. Synchronization primitives (mutexes, semaphores, channels) coordinate access to shared resources. Modern languages increasingly favor message passing and async/await over shared-memory threading.