Question: Consider the following two transactions: T 31 : read (A); read (B); If A = 0 then B: = B + 1; write (B). T

Consider the following two transactions:

T31: read (A); read (B);

If A = 0 then B: = B + 1; write (B).

T32: read (B); read (A);

If B = 0 then A: = A + 1; write (A).

Add lock and unlock instructions to transactions T31 and T32, so that they observe the two-phase locking protocol. Can the execution of these transactions result in a deadlock?

Step by Step Solution

3.39 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Lock and unlock instructions T 31 lockS A Read A LockX B Read B If A 0 Then ... View full answer

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

Document Format (1 attachment)

Word file Icon

16-CS-DB (329).docx

120 KBs Word File

Students Have Also Explored These Related Databases Questions!