WishWiki

Concurrency (computing)

Concurrency is the ability of a computer system to execute multiple tasks or processes seemingly at the same time, whether through true parallelism on multiple processors or by rapidly switching between tasks on a single processor.

In modern computing, concurrency is essential for building responsive applications, maximizing hardware utilization, and handling multiple users or data streams simultaneously. A web server handling thousands of requests, a video game updating physics while rendering graphics, or a database processing queries all rely on concurrency to function smoothly.

The main challenge is managing shared resources—multiple tasks may need access to the same memory, files, or devices. Without careful coordination using techniques like locks, semaphores, or message passing, concurrent tasks can corrupt data or produce unpredictable results. This is the race condition problem.

Different programming languages and systems offer distinct concurrency models: threads for shared-memory parallelism, processes for isolation, asynchronous programming for non-blocking operations, or coroutines for cooperative multitasking. Choosing the right model depends on the problem domain and performance requirements.

Concurrency is notoriously subtle—bugs may hide for years before appearing under specific timing conditions, making rigorous testing and design discipline vital.

Related

Parallel computing, Mutex, Deadlock, Actor model, Distributed systems, Event loop

Wishing…
your wish is being written

✨ Wish for a new page

👁 Wish for another view of this page

Sign in to WishWiki

Keep your wishes together, see your activity — and later, get your own private wiki space.

⏱ Page history