Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

=+Define social listening and social monitoring

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago

Question

What are some of the possible scenes from our future?

Answered: 1 week ago