in Databases reopened by
469 views
0 votes
0 votes

When transaction $Ti$ requests a data item currently held by $Tj,Ti$ is allowed to wait only if it has a time stamp smaller than that of $Tj$ (that is $Ti$ is order than Tj). Otherwise, $Ti$ is rolled back (dies). This is

  1. Wait-die
  2. Wait-wound
  3. Wound-wait
  4. Wait
in Databases reopened by
469 views

2 Comments

ANS : A  WAIT DIE

In this method, if a transaction requests to lock a resource (data item), which is already held with a conflicting lock by another transaction,
0
0

1 Answer

0 votes
0 votes

WAIT-DIE METHOD


In this method, if a transaction requests to lock a resource (data item), which is already held with a conflicting lock by another transaction, then
one of the two possibilities may occur 

 

1• If $TS(T_{i})$ < $TS(T_{j};) $

  • that is$ T_{i}$ which is requesting a conflicting lock, is older than $T_{j}$
  • then $T_{i}$ is allowed to wait until the data-item is available.

 

2• $If TS(T_{i}) > TS(T_{j})$

  •  that is $T_{i}$ is younger than $T_{j}$ . Then$ T_{i}$ dies.
  •  $T_{i}$ is restarted later with a random delay but with the same timestamp.This method allows the older transaction to wait but kills the younger one.
Answer:

Related questions