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
a Lock and unlock instructions T 31 lockS A Read A LockX B Read B If A 0 Then ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
16-CS-DB (329).docx
120 KBs Word File
