Flashcard Deck · 21 cards · Public

Concurrency - Locks, Semaphores & Deadlock Prevention

Master core concurrent programming concepts including synchronization primitives, race conditions, Coffman conditions, and deadlock prevention strategies.

Cards in this deck

(21 cards)

Preview terms and definitions before starting your study session.

#1
Term
Deadlock Prevention: Resource Ordering
Definition
A strategy that eliminates the Circular Wait condition by establishing a global strict ordering of resources () and requiring threads to always acquire resources in increasing order.
#2
Term
Race Condition
Definition
A flaw in a concurrent system where the output or behavior is non-deterministic and depends unexpectedly on the sequence or timing of execution threads.
#3
Term
Critical Section
Definition
A segment of code that accesses a shared resource (such as global variables or shared memory) that must not be concurrently accessed by more than one thread of execution.
#4
Term
Mutual Exclusion (Mutex)
Definition
A locking mechanism used to synchronize access to a resource, ensuring that only one process or thread can execute a critical section at any given time.
#5
Term
Spinlock
Definition
A synchronization lock where a thread repeatedly polls the lock status in a tight loop (busy-waiting) until it becomes available. Efficient when context switching overhead exceeds expected wait time.
#6
Term
Reentrant Lock
Definition
A lock that allows a thread to re-acquire a lock it already holds without deadlocking itself. It tracks an internal lock count and requires an equivalent number of unlocks to be released.
#7
Term
Mutex vs. Binary Semaphore
Definition
A mutex enforces strict ownership—only the thread that acquired the lock can release it. A binary semaphore has no concept of ownership; any thread can call signal() to unblock a waiting thread.
#8
Term
Counting Semaphore
Definition
A semaphore initialized with an integer counter , used to control access to a finite pool of identical resources.
Showing 8 of 21 cards in this deck.
Study All Now

Related Flashcard Sets

Explore similar study materials created by the community

Browse community decks