CS 3306 Written Assignment Unit 2
CS 3306 Written Assignment Unit 2
Introduction
Deadlocks occur in database management systems (DBMS) when multiple transactions hold
resources that others need, leading to a cycle of waiting that prevents further progress. When a
detection algorithm identifies a deadlock, the system must take corrective actions to recover. The
most common method is rolling back one or more transactions to break the deadlock
(Silberschatz, Korth, & Sudarshan, 2001). Figure 16.19 from Database System Concepts outlines
The system must choose which transaction(s) to roll back to resolve the deadlock. This
selection is based on factors such as transaction priority, execution time, and the number
of resources held. A transaction that has performed minimal work or has lower priority is
2. Rollback Execution
Once the victim is identified, the system must decide whether to perform a partial or
total rollback.
○ Partial rollback undoes only the latest operations, allowing the transaction to
beginning.
The choice between these methods depends on the impact of rollback on system
3. Preventing Starvation
Starvation occurs when the same transaction is repeatedly chosen as the victim,
preventing it from completing. To avoid this, the system may implement a wait-time
priority scheme, ensuring older transactions have a lower chance of being aborted
delays.
Figure 16.19 illustrates the deadlock recovery process in a DBMS. It visually represents how
transactions are identified, evaluated, and rolled back systematically to break the deadlock cycle.
The figure emphasizes the importance of transaction selection and rollback strategy to ensure
minimal disruption to the database system while resolving the deadlock efficiently.
Conclusion
Deadlocks are an unavoidable challenge in concurrent database systems. When detected, the
system must take strategic recovery actions: selecting an appropriate victim, executing a rollback
database systems can maintain consistency and ensure smooth transaction processing without
Silberschatz, A., Korth, H. F., & Sudarshan, S. (2001). Database System Concepts (4th ed.). New