Question
Question 6: Deadlock Prevention . . . . . . . . . . . . . . . . . . . . .
Question 6: Deadlock Prevention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [10 points] Given two transactions T1 and T2, where the timestamp assigned to T1 comes before the timestamp assigned to T2 (i.e., T1 has a higher priority than T2). 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. See table in the image Consider the schedule shown in Figure 1: (a) [2 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 (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 (c) [2 points] 2 T 2 F If a transaction is aborted because of the DBMSs deadlock prevention policy, then that transaction is assigned a new timestamp when it restarts Consider the schedule shown in Figure 2: (see the picture attached) (d) [2 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 (e) [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
Question 6: Deadlock Prevention [10 points] Given two transactions T1 and T2, where the timestamp assigned to T1 comes before the timestamp assigned to T2 (i.e., T1 has a higher priority than T2). 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. Figure 1: Schedule \#1 Consider the schedule shown in Figure 1: (a) [2 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 (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 (c) [2 points] TF If a transaction is aborted because of the DBMS's deadlock prevention policy, then that transaction is assigned a new timestamp when it restarts. Figure 2: Schedule \#2 Consider the schedule shown in Figure 2: (d) [2 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 (e) [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
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