Consider the following sequence of actions, listed in the order it is submitted to the DBMS (S is a
shared lock, X is an exclusive lock):
S1: T1:S(A), T2:X(A), T3:X(B), T1:X(B), T3:S(A)
S2: T1:S(A), T2:X(A), T3:X(B), T3:X(A), T1:S(B)
For S1 and S2 as given above, answer the following questions:
Q3.1. (4 points) For S1, write whether lock requests of its actions will be granted or blocked by
the lock manager.
Q3.2. (4 points) Draw the waits-for graphs for S1 and write if the schedule will result in a deadlock
condition. If there is no deadlock condition, write the order of completion of the schedule.
Explain in 1-2 lines.
Q3.3. (6 points) For S2, write whether the lock requests of its actions will be granted or blocked
by the lock manager.
Q3.4. (6 points) Draw the waits-for graphs for S2 and write if the schedule will result in a deadlock
condition. If there is no deadlock condition, write the order of completion of the schedule.
Explain in 1-2 lines.