Wait-die and Wound-wait Schemes 8

Wait-die scheme: It is a non-preemptive technique for deadlock prevention. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp smaller than that of Tj (That is Ti is older than Tj), otherwise Ti is rolled back (dies)

For example:

Suppose that transaction T22, T23, T24 have time-stamps 5, 10 and 15 respectively. If T22requests a data item held by T23 then T22 will wait. If T24 requests a data item held by T23, then T24 will be rolled back.

 

Wound-wait scheme: It is a preemptive technique for deadlock prevention. It is a counterpart to the wait-die scheme. When Transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it has a timestamp larger than that of Tj, otherwise Tj is rolled back (Tj is wounded by Ti)

For example:

Suppose that Transactions T22, T23, T24  have time-stamps 5, 10 and 15 respectively . If T22requests a data item held by T23, then data item will be preempted from T23 and T23 will be rolled back. If T24 requests a data item held by T23, then T24 will wait.  

Wait-die and Wound-wait Schemes
4.6 (92.17%) 115 votes

8 thoughts on “Wait-die and Wound-wait Schemes

  1. Reply symptoms of panic attack Jun 16,2014 2:50 pm

    Hi there, I found your web site by means of Google while searching
    for a related matter, your web site got here up, it seems good.
    I’ve bookmarked it in my google bookmarks.
    Hi there, just changed into alert to your weblog thru Google, and located that
    it is truly informative. I am going to watch out for brussels.
    I’ll appreciate for those who proceed this in future.
    Many people will likely be benefited from your writing.
    Cheers!

  2. Reply Adjustable kettlebells Nov 26,2014 1:59 pm

    You really make it appear really easy with your presentation but I in finding this topic to be really one thing that I think I
    would by no means understand. It sort of feels too complex and very vast for me.
    I am taking a look ahead for your next submit, I’ll try to get the grasp of it!

  3. Reply mousa1983 Dec 5,2014 2:10 am

    Very nice,Thanks…

  4. Reply Aswin Feb 6,2015 2:59 pm

    Very Well Explained. Thanks.

  5. Reply sammy May 23,2015 1:48 pm

    Thanks , easy explanation.

  6. Reply Sasa alise Saravanan Sep 18,2015 9:06 pm

    Nice.. short explanation.. but I need more visual example.. is it possible? Thank you..

  7. Reply THABO Jun 13,2016 7:42 am

    Vey well understood. Thank you and God bless you ๐Ÿ™‚

  8. Reply Skati May 16,2017 3:58 pm

    Hi, can you please help with the below question

    Consider the sequence of actions given below, listed in the order it is submitted to the
    DBMS. The timestamps of the transactions involved are as follows:
    T1 = 10345, T2 = 10346, T3 = 10347
    T3: R(Y),
    T3: W(X),
    T1: R(Z),
    T1: W(Z),
    T2: R(X),
    T1: W(Y),
    T3: W(U),
    T2: R(Z),
    T1: R(U),
    T1 commits,
    T2 commits
    Make use of timestamping concurrency control, implemented using the Wound / Wait AND Wait/Die scheme
    scheme, to show how the sequence is handled.

Leave a Reply