Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Write and Read locks (X and S locks, respectively), describe a locking strategy which will mitigate the inconsistent analysis issue shown in the diagram.

Using Write and Read locks (X and S locks, respectively), describe a locking strategy which will mitigate the inconsistent analysis issue shown in the diagram. Ensure that you detail a strategy on how you will solve any deadlocks that occur. Transaction A sums up account balances. Transaction B transfers 10 units from Account 3 to 1. The inconsistent happens because Transaction B changed Account 3s amount while Transaction A was summing up the account balances, Transaction A obtained an incorrect result.

image text in transcribed

Account 1 Account 2 Account 3 60 50 20 Transaction A Time Transaction B t1 Retrieve Acc 1, sum = 60 Retrieve Acc 2 Sum = 110 t2 t3 Retrieve Acc 3 t4 Update Acc 3, 20-> 10 t5 Retrieve Acc 1 t6 Update Acc 1,60 -> 70 t7 COMMIT Retrieve Acc 3, sum = 120, not 130 t8 Account 1 Account 2 Account 3 60 50 20 Transaction A Time Transaction B t1 Retrieve Acc 1, sum = 60 Retrieve Acc 2 Sum = 110 t2 t3 Retrieve Acc 3 t4 Update Acc 3, 20-> 10 t5 Retrieve Acc 1 t6 Update Acc 1,60 -> 70 t7 COMMIT Retrieve Acc 3, sum = 120, not 130 t8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Accounting questions