Concurrency & Parallelism Glossary
Threads, processes, mutexes, deadlocks, race conditions, goroutines, async/await, actor model — concurrency concepts explained clearly.
Pages in this section
Thread — Explained with Examples
A thread is the smallest unit of execution within a process, sharing memory space with other threads for efficient concurrent work.
✓ LiveProcess — Explained with Examples
A process is an independent program in execution with its own memory space, files, and system resources, isolated from other processes.
✓ LiveMutex — Explained with Examples
A mutex (mutual exclusion) is a synchronization primitive that prevents multiple threads from accessing a shared resource simultaneously.
✓ LiveSemaphore — Explained with Examples
A semaphore is a signaling mechanism that controls access to a shared resource by multiple threads using a counter-based permit system.
✓ LiveDeadlock — Explained with Examples
Deadlock occurs when two or more threads are blocked forever, each waiting for a resource held by another thread in a circular chain.
✓ LiveRace Condition — Explained with Examples
A race condition occurs when the outcome of concurrent operations depends on the non-deterministic timing of thread execution.
✓ LiveActor Model — Explained with Examples
The actor model is a concurrent computation paradigm where actors are isolated units that communicate exclusively through asynchronous messages.
✓ LiveGoroutine — Explained with Examples
A goroutine is a lightweight thread managed by the Go runtime, multiplexed onto OS threads with efficient stack management.
✓ LiveCoroutine — Explained with Examples
A coroutine is a cooperative multitasking construct that can suspend execution and resume later, enabling non-blocking concurrent code.
✓ LiveAsync/Await — Explained with Examples
Async/await is syntactic sugar for working with promises or futures, allowing asynchronous code to be written in a sequential, readable style.
✓ LiveConcurrency vs Parallelism — Explained with Examples
Concurrency is about structuring multiple tasks that can run in overlapping time periods; parallelism is about running multiple tasks simultaneously.
✓ LiveFork-Join — Explained with Examples
Fork-join is a parallel execution model where tasks split (fork) into subtasks and later merge (join) results after completion.
✓ LiveCSP — Explained with Examples
CSP (Communicating Sequential Processes) is a concurrent model where processes communicate through channels rather than shared memory.
✓ LiveLock-Free Programming — Explained with Examples
Lock-free programming uses atomic operations like CAS (Compare-And-Swap) to coordinate threads without mutexes, avoiding deadlocks and contention.
✓ LiveThread Safety — Explained with Examples
Thread safety ensures shared data behaves correctly when accessed by multiple threads, preventing race conditions and data corruption.
✓ LiveCritical Section — Explained with Examples
A critical section is a block of code that accesses shared resources and must not be executed by multiple threads simultaneously.
✓ Live