...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 737
When transaction T​ i​ requests a data item currently held by T​ j​ , T​ j​ is allowed to wait only if it has a timestamp smaller than that of T​ j​ (that is, T​ i​ older than T​ j​ ). Otherwise, T​ i​ is rolled back(dies). this is
A
Wait-die
B
Wait-wound
C
Wound-Wait
D
Wait
Question 737 Explanation: 
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 −
● 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.
● 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.
Correct Answer: A
Question 737 Explanation: 
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 −
● 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.
● 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.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!