Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question: Using a time stamping technique to prevent deadlock from occurring we

ID: 3547323 • Letter: Q

Question

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. R1 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 T3

Explanation / 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.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote