Question: Problem about two phase locking QUESTION B2 (12 marks) (a) (4 marks) Discuss the atomicity, durability, isolation, and consistency preservation properties of a database transaction.

Problem about two phase locking

Problem about two phase locking QUESTION B2 (12 marks) (a) (4 marks)

QUESTION B2 (12 marks) (a) (4 marks) Discuss the atomicity, durability, isolation, and consistency preservation properties of a database transaction. (b) (4 marks) Consider a database with objects X and Y, and the following two transactions T1 and T2 involving those objects: T1 T2 begin.transactionbegin transaction read(X); read (Y) x = x-Y ; write (X); read (Y) read(X); read (Y); x = x+10 ; write(X); write (Y) (i) Give an example of a schedule involving transactions T1 and T that results in (ii) Add lock and unlock instructions to the transaction T1 (iii) Explain how the use of two-phase locking proto can'soKe the conflict you a write-write conflict (lost update) observe the two-phase locking protocol (2PL) identified in part (i) above. that they (c) (4 marks) (i) Discuss whether any concurrent execution of ese two transactions T1 and T2 shown in part (b) can result in a (ii) Verify whether the lock/unlock instuctions that you introduced in part b(ii) explain how it could have been above lead to a deadlock prevented

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 Databases Questions!