Starvation | Deadlock |
Starvation happens if same transaction is always choosen as victim. | A deadlock is a condition in which two or more transaction are waiting for each other. |
It occurs if the waiting scheme for locked items in unfair, giving priority to some transactions over others. | A situation where two or more transactions are unable to proceed because each is waiting for one of the other to do something. |
Starvation is also known as lived lock. | Deadlock is also known as circular waiting. |
Avoidance: ->switch priorities so that every thread has a chance to have high priority. -> Use FIFO order among competing request. | Avoidance: ->Acquire locks are predefined order. ->Acquire locks at once before starting. |
It means that transaction goes in a state where transaction never progress. | It is a situation where transactions are waiting for each other. |
Example : | Example : |
Monday, March 21, 2011
Starvation Vs Deadlock
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment