Deadlocks and Deadlock Handling in Multi-Process Systems

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering the concepts of deadlocks, wait-for graphs, deadlock prevention schemes (Wait-Die and Wound-Wait), deadlock avoidance, starvation, and victim selection.

10 Terms

1
New cards

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.

2
New cards

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 TiT_i to TjT_j if TiT_i is waiting to lock an item currently locked by TjT_j.

3
New cards
<p>Cycle in a Wait-for Graph</p>

Cycle in a Wait-for Graph

A closed loop of directed edges between transactions and locked resources that indicates a deadlock has occurred.

4
New cards

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.

5
New cards

Wait-Die Scheme

A timestamp-based deadlock prevention scheme where if TS(Ti)<TS(Tj)TS(T_i) < TS(T_j) (the requesting transaction TiT_i is older), TiT_i is permitted to wait, but if TS(Ti)>TS(Tj)TS(T_i) > TS(T_j) (TiT_i is younger), TiT_i dies and is restarted later with a random delay and the same timestamp.

6
New cards

Wound-Wait Scheme

A timestamp-based deadlock prevention scheme where if TS(Ti)<TS(Tj)TS(T_i) < TS(T_j) (the requesting transaction TiT_i is older), TiT_i wounds TjT_j by forcing it to roll back and restart with the same timestamp, but if TS(Ti)>TS(Tj)TS(T_i) > TS(T_j) (TiT_i is younger), TiT_i is forced to wait.

7
New cards

Deadlock Avoidance

A mechanism used to detect deadlock conditions in advance without always aborting transactions, best suited for lightweight systems with fewer resource instances.

8
New cards

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.

9
New cards

Victim Selection

The process of using a relative algorithm to decide which specific transaction to abort and roll back to resolve an existing deadlock.

10
New cards

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.