21 cards · Public · Shuffle

Concurrency & Parallelism in Software Engineering

Master core multi-threading concepts, synchronization primitives, and classic concurrency patterns with this high-yield flashcard deck designed for software engineers.

Cards in this deck

(21 cards)

Preview terms and definitions before starting your study session.

#1
Term
Process vs. Thread
Definition
A process is an independent, isolated execution environment with its own memory space allocated by the OS. A thread is the smallest unit of execution within a process that shares memory and resources with other threads in the same process.
#2
Term
Concurrency vs. Parallelism
Definition
Concurrency is about dealing with multiple tasks at once by interleaving execution on a single core or multiple cores. Parallelism is about doing multiple tasks simultaneously on physical multi-core hardware.
#3
Term
Race Condition
Definition
A flaw that occurs when a system's output depends on the non-deterministic sequence or timing of uncontrollable execution events (such as thread scheduling), leading to unpredictable behavior.
#4
Term
Critical Section
Definition
A code segment that accesses shared resources (like global variables or files) and must not be executed by more than one thread concurrently to prevent race conditions.
#5
Term
Mutex (Mutual Exclusion Lock)
Definition
A synchronization mechanism that grants exclusive access to a shared resource to a single thread at a time. Threads must lock the mutex before entering a critical section and unlock it upon exit.
#6
Term
Counting Semaphore vs. Binary Semaphore
Definition
A Binary Semaphore has a state of 0 or 1 and works similarly to a mutex. A Counting Semaphore maintains an integer counter to control access to a finite pool of shared resources.
#7
Term
Deadlock
Definition
A situation where a set of threads are blocked permanently because each thread holds a resource that another thread requires, forming a circular dependency.
#8
Term
Four Coffman Conditions for Deadlock
Definition
1. Mutual Exclusion: Resources cannot be shared.
2. Hold and Wait: Threads hold resources while waiting for others.
3. No Preemption: Resources cannot be forcibly taken from threads.
4. Circular Wait: A closed chain of threads exists where each waits for a resource held by the next.
Showing 8 of 21 cards in this deck.
Study All Now