1/19
Flashcards covering key concepts in concurrency, threading, synchronization, and their management.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Concurrency
Multiple things happening at once and using the same resource.
Threads
Units of execution within an application that share the same address space but have their own program counters and stack.
Thread Control Block
Data structure containing the saved state of a thread.
Thread Local Storage
Storage where each thread contains its own stack.
Race Condition
Condition that occurs when multiple threads access shared data simultaneously, leading to indeterminate results.
Critical Section
Section of code that can lead to a race condition if accessed by multiple threads.
Mutual Exclusion
Property ensuring that if one thread is executing in a critical section, no other thread can enter.
Atomicity
Property whereby operations cannot be interrupted mid-execution; they are completed entirely or not at all.
Synchronization Primitives
Basic tools provided by the OS or hardware to ensure correct execution of concurrent programs.
Semaphore
Synchronization primitive used to control access to a shared resource using an integer counter.
Producer/Consumer Problem
Problem involving producers creating data and consumers taking that data from a limited-capacity buffer.
Condition Variables
Synchronization primitive allowing threads to wait for conditions to change.
Yielding
A thread voluntarily relinquishing control so that other threads can run.
Sleeping
An operation where a thread goes to sleep until it's explicitly awakened by another thread.
Write-back Caching
Cache write strategy where updates only write to the cache and write to main memory when the cache line is flushed.
Deadlock
Situation where threads are stuck waiting for resources held by one another and none can proceed.
Event-based Concurrency
Concurrency model where tasks are handled through events and callbacks instead of separate threads.
Continuation
A data structure that stores the state of a computation, allowing it to resume after an event.
Explicit Blocking
When a thread intentionally waits for a resource or condition.
Implicit Blocking
Unexpected delays in the program caused by hardware delays or resource unavailability.