Question: Question 6 : Transactions ( 1 5 marks ) Let transactions T 1 , T 2 and T 3 be defined to perform the following

Question 6: Transactions (15 marks)
Let transactions T1,T2 and T3 be defined to perform the following operations:
T1: Add one to A
T2: Double A
T3: Display the current value of A on the screen and then set A to one
(where A is some numeric item in the database).
(a) Suppose transactions T1, T2 and T3 are allowed to execute concurrently. If A has
initial value zero, how many possible correct results are there? List them.
(b) Suppose the internal structure of T1, T2 and T3 is as indicated in the following
pseudocode. If A has initial value zero, is there any interleaved schedules that in
fact product a correct result and yet is not serializable? Explain your answer.
Question 6(continued)
(c) Are there any schedules that are in fact serializable but could not be produced if
all three transactions obeyed the two-phase locking protocol? Show your work.
Question 6 : Transactions ( 1 5 marks ) Let

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!