Skip to main content
Definition Website Computer and Technology

Concurrency

Subject: Computer and Technology noun /kənˈkɜːr.ən.si/ 1 definition

  1. Definition (noun)

    Entry #182 · Updated

    Concurrency is the property of a program or system in which multiple independent computations make progress over overlapping time periods. Rather than waiting for one task to finish completely before starting the next, a concurrent system interleaves execution—such as by switching to another task while waiting for a disk or network response—so several workflows advance together. Unlike parallelism, which requires simultaneous physical execution across multiple processor cores, concurrency is an architectural approach to structuring and coordinating overlapping work and can occur even on a single core. Its core purpose is to improve responsiveness, throughput, and resource utilization while safely managing shared state, ordering, and synchronization to prevent hazards such as race conditions and deadlocks.

    Common Forms

    • Shared-Memory Multithreading: Multiple threads within a single process share an address space and are preemptively scheduled by the operating system, relying on synchronization primitives such as mutexes, semaphores, or atomic operations to protect shared data.

    • Asynchronous Event-Driven Concurrency: A single thread or small thread pool uses an event loop and non-blocking operations—typically via callbacks, futures, or async/await—to switch cooperatively between tasks at suspension points with minimal context-switching overhead.

    • Message-Passing Concurrency: Isolated units of execution, such as actors or lightweight tasks communicating over channels, avoid sharing mutable memory and coordinate exclusively by sending and receiving messages.

    • Multiprocessing: Separate operating system processes execute concurrently in isolated memory spaces and exchange data over inter-process communication mechanisms such as pipes, sockets, or message queues, avoiding shared-memory lock contention.

    Example

    A web API server using an asynchronous event loop handles 2,000 simultaneous client connections on a single thread by issuing non-blocking queries to PostgreSQL and Redis. Whenever one request pauses while waiting for a database response over the network, the runtime switches to parsing payloads or writing responses for other active requests, keeping overall latency low.