Please answer the below question: Using a time stamping technique to prevent dea
ID: 3547314 • Letter: P
Question
Please answer the below question:
Using a time stamping technique to prevent deadlock from occurring we presented two different protocols: "wait or die" and "wound or wait". Given the transaction timestamps: ts(T1) = 10, ts(T2) = 5, ts(T3) = 12, and ts(T4) = 6, determine the action of both protocols for each of the following scenarios. T1 requests an object whose lock is held by T3 T2 requests an object whose lock is held by T1. T4 requests an object whose lock is held by T2. T4 requests an object whose lock is held by T3Explanation / Answer
by wait-die here--- Ti request Tj if TS(Ti)<TS(Tj)--Ti will wait else Ti will rollback
a) T1 will wait
b)T2 will wait
c)T4 will rollback
d)T4 will wait
by wound or wait here---
Ti request Tj
if TS(Ti)<TS(Tj)-- Tj will rollback ( Tj is woundedbyTi )
else Ti will wait
a)then the data item will be preempted fromT3 to T1, andT3 will be rolled back.
b)then the data item will be preempted fromT1 to T2, andT1 will be rolled back.
c)T4 will be wait
d)then the data item will be preempted fromT3 to T4 , and T3 will be rolled back.