Concept Flow - Deadlock detection and prevention
Transaction 1 starts
Transaction 1 locks Resource A
Transaction 2 starts
Transaction 2 locks Resource B
Transaction 1 requests Resource B
Transaction 2 requests Resource A
Deadlock detected
Deadlock resolution: rollback one transaction
Resources released, transactions continue
Two transactions lock different resources and then wait for each other's locked resource, causing a deadlock. The system detects this and rolls back one transaction to resolve it.