Concept Flow - Deadlock handling in databases
Transaction T1 requests Resource R1
Transaction T2 requests Resource R2
T1 waits for R2 held by T2
T2 waits for R1 held by T1
Deadlock detected
Deadlock handling: Choose victim
Abort victim transaction
Release victim's resources
Other transaction proceeds
Deadlock resolved
Transactions request resources and wait; if each waits for the other, a deadlock occurs. The system detects this and aborts one transaction to free resources and resolve the deadlock.