1 Answers
Option 1 : The database system is both deadlock-free and starvation-free.
Concept:
Wound – wait scheme means the newer transactions are killed when an older transaction make a request for a lock being held by newer transaction.
Explanation:
Here, Unique timestamps are assigned to each transaction using Lamport’s logical clock.
1) Now, first check if is it wound – wait scheme?
If TS(T2) < TS(T1) then
T1 is killed
else T2 waits.
This logic comes under wound – wait scheme, because it is given that T1 holds a lock on the resource R and T2 has requested a lock on same resource R. When T2 requests, T1 is killed because timestamp of T1 is larger than T2 means T1 is the newer transaction.
2) Now, wound – wait avoid starvation or not?
As newer transaction dies and restart with same timestamp and older one survives so after older transaction new will definitely execute. It means no possibility of starvation.
3) Deadlock free or not?
As, there is no starvation in this means no deadlock possibility.