•Deadlocks can be overcome by:
1 ) Prevention 2) Detection and Recovery
1 ) Prevention
“This approach ensures that system will never enter indead deadlock state”
A transaction must lock all the data items it needs beforeexecution begins.
Data-item utilization may be slow.
Ordering
If a transaction requires access to two records, make surethat they are always accessed in the same order.
In our case, always access A before B.
May slow down operations considerably