What Is Deadlock Prevention?
Deadlock prevention methods guarantee that deadlocks cannot occur in the first place. Thus the transactions manager checks a transaction when it is first initiated and does not permit it to precede it may cause a deadlock. To perform this check, it is require that all of the data items that will be accessed, by a transaction be predeclared. The transactions manager then permits a transactions be predeclared. The transaction manager then permits a transaction to proceed if all the data items that it will access are available. Otherwise, the transaction is not permitted to proceed. The transaction manager reserves all the data items that are predeclared by a transaction that it allows proceeding. Unfortunately such systems are not very suitable for database environments. The fundamental problem is that it is usually difficult to know precisely which data items will be accessed by a transaction. Access to certain data item may depend upon condition that may not be resolved until run time.