Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2006R McFadyen ACS 49021 Deadlock Prevention Strategies wait-die wound-wait schemes use transaction timestamps for the sake of deadlock prevention.

Similar presentations


Presentation on theme: "Fall 2006R McFadyen ACS 49021 Deadlock Prevention Strategies wait-die wound-wait schemes use transaction timestamps for the sake of deadlock prevention."— Presentation transcript:

1 Fall 2006R McFadyen ACS 49021 Deadlock Prevention Strategies wait-die wound-wait schemes use transaction timestamps for the sake of deadlock prevention Both in wait-die and in wound-wait schemes, a rolled back transaction is restarted with its original timestamp. Older transactions have precedence over newer ones, and starvation is hence avoided.

2 Fall 2006R McFadyen ACS 49022 Deadlock Prevention Strategies wait-die scheme –older transaction waits for a younger transaction to release a data item. Younger transactions never wait for older ones; they are rolled back instead. –a transaction may die several times before acquiring needed data item

3 Fall 2006R McFadyen ACS 49023 Deadlock Prevention Strategies wound-wait scheme –older transaction wounds (forces rollback) of younger transaction instead of waiting for it. Younger transactions may wait for older ones. –may be fewer rollbacks than wait-die scheme.

4 Fall 2006R McFadyen ACS 49024 Deadlock Prevention Strategies T1 Begin transaction Read_item(customer ‘A’) Write_item(customer ‘A’) Read_item(order ‘123’) Write_item(order ‘123’) T2 Begin transaction Read_item(customer ‘A’) What occurs in the following schedule for a)wait-die? b)wound-wait?

5 Fall 2006R McFadyen ACS 49025 Deadlock Prevention Strategies T1 Begin transaction Read_item(customer ‘ A ’) Write_item(customer ‘ A ’) Read_item(order ‘123’) Write_item(order ‘123’) T2 Begin transaction Read_item(customer ‘A’) What occurs in the following schedule for a)wait-die? b)wound-wait?


Download ppt "Fall 2006R McFadyen ACS 49021 Deadlock Prevention Strategies wait-die wound-wait schemes use transaction timestamps for the sake of deadlock prevention."

Similar presentations


Ads by Google