deadlock prevention strategies n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Deadlock Prevention Strategies PowerPoint Presentation
Download Presentation
Deadlock Prevention Strategies

Loading in 2 Seconds...

play fullscreen
1 / 5

Deadlock Prevention Strategies - PowerPoint PPT Presentation


  • 143 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Deadlock Prevention Strategies' - lonna


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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.

Deadlock Prevention Strategies

R McFadyen ACS 4902

deadlock prevention strategies1
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

deadlock prevention strategies2
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

deadlock prevention strategies3
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

deadlock prevention strategies4
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