1 / 5

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.

lonna
Download Presentation

Deadlock Prevention Strategies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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. Deadlock Prevention Strategies R McFadyen ACS 4902

  2. 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 Deadlock Prevention Strategies R McFadyen ACS 4902

  3. 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. Deadlock Prevention Strategies R McFadyen ACS 4902

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

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

More Related