Concept Flow - Deadlock concept and prevention
Transaction A locks Resource 1
Transaction B locks Resource 2
Transaction A requests Resource 2
→Wait
Transaction B requests Resource 1
→Wait
Deadlock detected: both wait forever
Deadlock prevention: Abort one transaction or use timeout
Two transactions each hold a resource and wait for the other, causing a deadlock; prevention involves detecting and resolving this cycle.