Question: 2. Concurrency and Control: (5 marks) Question 2.1 (5 marks) Jane and John Doe share a joint bank account (checking) and both have accessed two


2. Concurrency and Control: (5 marks) Question 2.1 (5 marks) Jane and John Doe share a joint bank account (checking) and both have accessed two different ATM windows on separate locations to process individual transactions concurrently. Jane wishes to withdraw $25 from the account (T) whereas John wishes to deposit $100 into the same account (T2). Assuming that the operations of T1 and T2 execute in the same order shown in Table 1 representing schedule Schecking, answer the following questions: (a) What concurrency control problem does schedule Schecking exhibit? Briefly justify your answer. (b) Assume that the initial balance in the checking account is $1,475 prior to executing Schecking, what value does it have after the following Schecking schedule executes? (c) Is Schecking conflict serializable? Identify an equivalent serial schedule, if any. (d) Using the 2PL locking, how can a DBMS prevent the problem identified in (a). Table 6.1: Schecking Representing T1 and T2 for a Checking Bank Account Time . T2 ti read_item(bal checking) tz read_item (bal checking) tz balahacking = balanecking tu balchecking - bal.checking + 100 write_item(balchecking) t6 write_item(bal checking) 25 (a) (b) 1. Transaction Processing: (10 marks) Question 1.1 (3 marks) How many serial schedules exist for the three transactions shown in Figure 6.17 What are they? What is the total number of possible schedules? Transaction Transaction T, Transaction T, read_item(X); read_item(z); read_item(Y); write_item(x): read_item(Y); read_item(); road_item(Y); write_item(Y); write_item(Y): write_item(Y); read_item(x); write_item(z): writo_item(x); Figure 6.1: The read and write operations of three transactions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
