Download presentation
Presentation is loading. Please wait.
Published byJeffrey Stevenson Modified over 9 years ago
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?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.