Question: Problem 3 : 2 PL ( 4 5 Points ) Consider the following two transactions: T 3 4 :read ( A ) ; read (

Problem 3: 2PL (45 Points)
Consider the following two transactions:
T34:read(A);
read(B);
ifA=0 then B:=B+1;
write (B)
T35:read(B)
read(A);
ifB=0 then A:=A+1;
write (A)
Add lock and unlock instructions to transactions T34 and T35 so that they observe the twophase locking protocol. (40 points)
Here are some instructions you can use:
Lock-S(A)
Lock-S(B)
Lock-X(A)
Lock-X(B)
Unlock(A)
Unlock(B)
Can the execution of these transactions result in a deadlock? (Just Yes or No)(5 points)
Problem 3 : 2 PL ( 4 5 Points ) Consider the

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