Deadlock
Everything on SkillVeris tagged Deadlock — collected across the glossary, study notes, blog, and cheat sheets.
17 resources across 2 libraries
Study Notes(4)
Deadlocks and How to Avoid Them
How PostgreSQL detects circular lock-wait dependencies, what it does when it finds one, and practical patterns to prevent deadlocks in application code.
Deadlock Conditions
The four necessary conditions (Coffman conditions) that must hold simultaneously for a deadlock to occur.
Deadlock Detection and Recovery
Letting deadlocks occur, detecting them via cycle/graph algorithms, and recovering through termination or preemption.
Deadlock Prevention and Avoidance
How to stop deadlocks before they happen: prevention breaks a Coffman condition; avoidance uses the Banker's Algorithm.
Interview Questions(13)
What is a Deadlock in Database?
A deadlock in a database happens when two or more transactions each hold a lock the other needs, so every transaction involved waits forever and none can proce…
How Do Databases Detect Deadlocks?
Databases detect deadlocks by building a wait-for graph, where each transaction is a node and an edge points from a waiting transaction to the transaction hold…
What is a Deadlock?
A deadlock is a situation where a set of processes are permanently blocked because each holds a resource the others need and is waiting for a resource another…
What Is a Monitor in OS?
A monitor is a high-level synchronization construct that bundles shared data with the procedures that operate on it, guaranteeing that only one thread can exec…
What Is the Banker’s Algorithm?
The Banker’s Algorithm is a deadlock-avoidance algorithm that grants a resource request only if the resulting system state is provably safe, meaning there stil…
What Is Deadlock Prevention?
Deadlock prevention is a design strategy that structurally rules out at least one of the four necessary conditions for deadlock — mutual exclusion, hold-and-wa…
What Is Deadlock Avoidance?
Deadlock avoidance is a dynamic strategy where the OS allows all four necessary conditions for deadlock to hold, but grants each resource request only after ch…
What Is Deadlock Detection?
Deadlock detection is a reactive strategy where the OS allows deadlock to potentially occur, periodically checks the system state for it using an algorithm ove…
What Is a Resource-Allocation Graph?
A resource-allocation graph is a directed graph model used to represent which processes hold which resources and which processes are waiting for which resource…
The Dining Philosophers Problem Explained
The dining philosophers problem is a classic model of resource deadlock and starvation where five philosophers sit around a table sharing five forks, each need…
What is Priority Inversion?
Priority inversion is a scheduling hazard where a high-priority task is indirectly blocked by a low-priority task holding a lock it needs, while an unrelated m…
What is a Livelock?
A livelock is a condition where two or more threads keep changing their state in response to each other purely to avoid a conflict, so both stay actively busy…
What is Starvation in CPU Scheduling?
Starvation is a scheduling failure where a process is repeatedly passed over in favor of other processes and, as a result, waits indefinitely and may never get…