Question
Question 10: Deadlock Prevention . . . . . . . . . . . . . . . . . . . . .
Question 10: Deadlock Prevention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [10 points] Given three transactions (T1, T2, T3), where the timestamp assigned to T1 comes before the timestamp assigned to T2 (i.e., T1 has a higher priority than T2), and the timestamp assigned to T2 comes before the timestamp assigned to T3 (i.e., T2 has a higher priority than T3). Let X-LOCK(A) represent an eXclusive lock requests for the database element A. Examine the schedules shown below and determine the correct course of action for a DBMS that is using Strict 2PL for either the Wound-Wait or Wait-Die deadlock prevention policies. For each schedule in the questions below, assume that no other transactions, nor other opera- tions, have happened. You can also assume that if transactions will abort, then the DBMS will abort them at the time they try to acquire a lock. You should not assume any preemptive aborts (i.e., when a transaction aborts a transaction waiting in the queue before it acquires the lock). See fig 4 in the picture Consider the schedule shown in Figure 4: (a) [3 points] What should happen if the DBMS is using the Wound-Wait policy? Mark all that apply. 2 T1 Waits 2 T1 Aborts 2 T2 Waits 2 T2 Aborts 2 T3 Waits 2 T3 Aborts (b) [2 points] What should happen if the DBMS is using the Wait-Die policy? Mark all that apply. 2 T1 Waits 2 T1 Aborts 2 T2 Waits 2 T2 Aborts 2 T3 Waits 2 T3 Aborts See fig 5 in the pic attached Consider the schedule shown in Figure 5: (c) [3 points] What should happen if the DBMS is using the Wound-Wait policy? Mark all that apply. 2 T1 Waits 2 T1 Aborts 2 T2 Waits 2 T2 Aborts 2 T3 Waits 2 T3 Aborts (d) [2 points] What should happen if the DBMS is using the Wait-Die policy? Mark all that apply. 2 T1 Waits 2 T1 Aborts 2 T2 Waits 2 T2 Aborts 2 T3 Waits 2 T3 Aborts
Question 10: Deadlock Prevention.[10 points ] Given three transactions (T1,T2,T3), where the timestamp assigned to T1 comes before the timestamp assigned to T2 (i.e., T1 has a higher priority than T2 ), and the timestamp assigned to T2 comes before the timestamp assigned to T3 (i.e., T2 has a higher priority than T3 ). Let X-LOCK(A) represent an eXclusive lock requests for the database element "A". Examine the schedules shown below and determine the correct course of action for a DBMS that is using Strict 2PL for either the Wound-Wait or Wait-Die deadlock prevention policies. For each schedule in the questions below, assume that no other transactions, nor other operations, have happened. You can also assume that if transactions will abort, then the DBMS will abort them at the time they try to acquire a lock. You should not assume any preemptive aborts (i.e., when a transaction aborts a transaction waiting in the queue before it acquires the lock). Figure 4: Schedule \#1 Consider the schedule shown in Figure 4: (a) [3 points] What should happen if the DBMS is using the Wound-Wait policy? Mark all that apply. T1 Waits T1 Aborts T2 Waits T2 Aborts T3 Waits T3 Aborts (b) [2 points] What should happen if the DBMS is using the Wait-Die policy? Mark all that apply. T1 Waits T1 Aborts T2 Waits T2 Aborts T3 Waits T3 Aborts Figure 5: Schedule \#2 Consider the schedule shown in Figure 5: (c) [3 points] What should happen if the DBMS is using the Wound-Wait policy? Mark all that apply. T1 Waits T1 Aborts T2 Waits T2 Aborts T3 Waits T3 Aborts (d) [2 points] What should happen if the DBMS is using the Wait-Die policy? Mark all that apply. T1 Waits T1 Aborts T2 Waits T2 Aborts T3 Waits T3 Aborts
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started