TOPICS (Click to Navigate)

Pages

Wednesday, October 15, 2014

4 necessary conditions for occurrence of deadlock



Four necessary conditions for occurrence of deadlock in databases / Four necessary conditions for deadlock to occur / Necessary and sufficient conditions for deadlock / List and discuss four conditions for deadlock / Necessary conditions that ensures a deadlock occurrence state

 

Necessary conditions for deadlock to occur in database


A deadlock can arise if the following 4 conditions hold simultaneously in a system;

  • Mutual exclusion: At least one resource is held in a non-sharable mode. For example, among transactions if there is any Exclusive lock (Write lock) request, that data item cannot be shared with others.
  • Hold and wait: There is a transaction which acquired and held lock on a data item, and waits for other data item.
  • No preemption: A situation where a transaction releases the locks on data items which it holds only after the successful completion of the transaction. Not on voluntarily.
  • Circular wait: A situation where a transaction say T1 is waiting for another transaction T2 to release lock on some data items, in turn T2 is waiting for another transaction T3 to release lock, and so on.
During transaction processing, if all the said conditions are held then there occurred a deadlock.


Go to Deadlock Handling Techniques in Database page
Go to Database Management Systems Home page

List of necessary conditions for deadlock to happen in database

No comments:

Post a Comment