1/74
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Monitor
A synchronization construct that contains a lock and condition variables, enabling mutual exclusion and controlled access to shared data.
Lock::Acquire()
A lock operation that blocks a thread until the lock becomes available, providing exclusive access to a resource.
Lock::Release()
A lock operation that unlocks access to a resource and wakes up a waiting thread if necessary.
Condition Variables
Variables that allow threads to wait for certain conditions within a locked context, facilitating synchronization.
Wait() operation
Atomically releases the lock and puts the thread to sleep until another thread signals it.
Signal() operation
Wakes up one thread from the waiting queue if any are present.
Broadcast() operation
Wakes up all threads waiting on that condition variable.
Hoare Monitors
Monitors that transfer control from the signaling thread directly to the waiting thread, often resulting in busy-wait scenarios.
Mesa Monitors
Monitors that place the waiting thread in a ready queue and require the thread to retest the waiting condition after being signaled.
Readers-Writers Problem
A synchronization issue where multiple readers can access data simultaneously but only one writer can, preventing data inconsistencies.
Critical Section
A segment of code that accesses shared resources and must be executed by only one thread at a time.
Mutual Exclusion
A property that ensures that only one thread can access a resource at any given time.
Race Conditions
Situations where the behavior of software depends on the relative timing of events, leading to unpredictable results.
Thread Scheduling
The method by which threads are assigned to processing resources in a computer system.
Semaphore
A signaling mechanism that can be used for synchronizing access to shared resources but manages both mutual exclusion and scheduling.
Best Practices for Locks
Acquire a lock before accessing shared data and release it immediately after the operation is complete.
Condition Variable Usage
Allows a thread to release a lock and wait for a condition without holding onto the lock unnecessarily.
Database Integrity
The accuracy and consistency of data within a database, maintained by proper synchronization mechanisms.
Multiple Readers
Can access the database simultaneously without modification but cannot do so if a writer is active.
Single Writer
Can modify the database but must wait if any readers or other writers are accessing it.
Thread Safety
The property of code to function correctly during simultaneous execution by multiple threads.
Deadlock
A situation where two or more threads are unable to proceed because each is waiting for the other to release a resource.
Locks and Condition Variables
Essential tools in monitors that help coordinate access and ensure correct synchronization in concurrent programming.
Atomic Operation
An operation that completes in a single step relative to other threads, ensuring data integrity.
Signaling between Threads
The process where one thread indicates to another that a certain condition has been met.
Thread Interaction
How threads communicate and synchronize with one another in a concurrent environment.
Priority Inversion
A scenario where a lower-priority thread holds a lock needed by a higher-priority thread, causing delays.
Lock-Free Data Structures
Data structures designed to allow threads to operate without the need for locks, reducing contention.
Thread Context Switching
The process of storing and restoring the state of a thread so that execution can be resumed later.
Mutual Exclusion Algorithms
Algorithms designed to ensure that only one thread accesses a critical section at a time.
Mutex
A mutual exclusion object that prevents multiple threads from accessing a shared resource simultaneously.
Concurrency Control
Techniques used to ensure that concurrent transactions do not lead to inconsistency in a database.
Notification Mechanism
A way for threads to inform each other about changes in state or conditions.
Thread Pool
A collection of pre-initialized threads that can be reused for executing tasks in parallel.
Shared Data
Data that is accessed by multiple threads and requires synchronization for safe access.
Blocking Queue
A queue that restricts access for threads until certain conditions are met, often used with condition variables.
Producer-Consumer Problem
A problem in concurrent programming where one thread produces data and another consumes it, requiring synchronization.
Event Wait Queue
A list of threads that are waiting for an event to occur before they can resume execution.
Lock Contention
A situation where multiple threads compete for a limited number of locks, leading to reduced performance.
Concurrency Framework
A set of tools and abstractions that help manage concurrent execution of threads.
Inter-thread Communication
Methods used by threads to exchange information and synchronize actions.
Resource Allocation Graph
A directed graph used to represent the allocation of resources among threads in a system.
Synchronized Method
A method that can only be executed by one thread at a time due to the use of locks.
Thread Safety Guarantee
An assurance that a piece of code will function correctly when accessed by multiple threads.
Asynchronous Operations
Operations that occur independently of the main program flow, often requiring notification of completion.
Barrier Synchronization
A method of synchronization where threads are blocked until a certain point in execution is reached.
Semaphore vs. Monitor
Semaphores manage both locking and scheduling, while monitors focus on locking, providing condition variables for scheduling.
Lock-based Synchronization
A form of synchronization where threads use locks to control access to shared resources.
Resource Locking
The practice of using locks to ensure exclusive access to shared resources by threads.
Asymmetric Semaphore
A semaphore that allows different threads to have different permissions, typically used for managing access rights.
Concurrent Modification Exception
An exception thrown when a collection is modified while it is being iterated over.
Signal-and-Wait Paradigm
A synchronization mechanism where a thread signals and waits for another thread to complete a task.
Reentrant Lock
A lock that allows the same thread to acquire it multiple times without causing a deadlock.
Non-blocking Algorithms
Algorithms designed to execute without needing locks, aiming for improved performance in concurrent systems.
Thread Local Storage
A programming construct that gives each thread its own instance of a variable.
Race Condition Prevention
Techniques employed to mitigate the risks of unintended interaction between threads.
Lock Downgrade
The action of changing a lock from exclusive to shared mode, commonly used in multi-reader scenarios.
Spinlock
A lock that causes a thread to repeatedly check for availability, which can lead to high CPU usage.
Thundering Herd Problem
A performance issue where many threads wake up simultaneously to compete for resource access.
Livelock
A situation where threads continuously change states in response to each other without making progress.
Memory Consistency Model
Rules that determine the order in which memory operations (reads/writes) must appear to execute.
Design Patterns in Concurrency
Reuseable solutions to common problems in concurrent programming, such as producer-consumer.
Execution Context
The environment in which a thread operates, including its call stack and local variables.
Preemptive Multitasking
A multitasking approach where the operating system can interrupt a currently running thread to switch to another.
Thread Coordination
The process of managing the execution order and interaction between threads.
Event Loop
A programming construct that waits for and dispatches events or messages in a program.
Atomicity Guarantee
A promise that a series of operations will execute completely or not at all, crucial for data integrity.
Fairness in Scheduling
A principle ensuring that each thread receives a reasonable amount of access to resources.
Lock-Free Synchronization
A method that allows threads to operate without acquiring locks, reducing contention in multi-threaded environments.
Stack Overflow in Thread Execution
An error that occurs when a thread exhausts the stack space allocated for it due to excessive recursion.
Non-blocking Synchronization
Techniques that allow shared data structures to be accessed and modified without explicit locks.
Thread Joining
The act of waiting for a thread to finish executing before continuing the execution of another thread.
Internal Fragmentation in Locking
Wasted space or inefficiency caused by the locking strategy in resource allocation.
Lock Optimization Techniques
Strategies aimed at reducing the performance impact of locks in concurrent programs.
Deferred Execution
A technique where work is postponed to be executed later, reducing immediate contention.