1/9
Vocabulary flashcards covering the concepts of deadlocks, wait-for graphs, deadlock prevention schemes (Wait-Die and Wound-Wait), deadlock avoidance, starvation, and victim selection.
Deadlock
An unwanted condition in a multi-process, shared resource environment where two or more processes indefinitely wait for resources held by each other, such that no process can finish its task and all remain in a waiting state forever.
Wait-for Graph (WFG)
A directed graph used in deadlock detection where each transaction is represented as a node and a directed edge is drawn from Ti to Tj if Ti is waiting to lock an item currently locked by Tj.

Cycle in a Wait-for Graph
A closed loop of directed edges between transactions and locked resources that indicates a deadlock has occurred.
Deadlock Prevention
A technique in which the DBMS aggressively inspects and analyzes operations prior to transaction execution and forbids any transaction from executing if it might lead to a deadlock situation.
Wait-Die Scheme
A timestamp-based deadlock prevention scheme where if TS(Ti)<TS(Tj) (the requesting transaction Ti is older), Ti is permitted to wait, but if TS(Ti)>TS(Tj) (Ti is younger), Ti dies and is restarted later with a random delay and the same timestamp.
Wound-Wait Scheme
A timestamp-based deadlock prevention scheme where if TS(Ti)<TS(Tj) (the requesting transaction Ti is older), Ti wounds Tj by forcing it to roll back and restart with the same timestamp, but if TS(Ti)>TS(Tj) (Ti is younger), Ti is forced to wait.
Deadlock Avoidance
A mechanism used to detect deadlock conditions in advance without always aborting transactions, best suited for lightweight systems with fewer resource instances.
Starvation
A situation where a transaction indefinitely waits for a data item and is never able to acquire it, such as when requests for already locked items are uniformly rejected.
Victim Selection
The process of using a relative algorithm to decide which specific transaction to abort and roll back to resolve an existing deadlock.
Victim
The specific transaction chosen by an algorithm to be aborted and rolled back in order to break a deadlock and unlock its held data items.