in Databases
184 views
0 votes
0 votes
In wait and die scheme we don't have starvation, if we add timeout to it, does it change? I think if we add timeout, it can cause starvation the old transaction always timeout before runnin and a new transaction will be run. Is that so?
in Databases
by
184 views

1 Answer

0 votes
0 votes

@Tara22

Both the wound-wait and the wait-die schemes avoid starvation ...

At any time, there is a transaction with the smallest timestamp. This transaction cannot be required to roll back in either scheme....

Since timestamps always increase, and since transactions are not assigned new timestamps when they are rolled back, a transaction that is rolled back will eventually have the smallest timestamp. Thus it will not be rolled back again....

 

1. https://gateoverflow.in/165484/Transaction 

 

2. https://gateoverflow.in/250908/Wait-die-and-wound-wait 

 

3. https://gateoverflow.in/273872/Wait-die-deadlock-prevention-strategy

 

 

by