

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


75 Points
Due May 5th, submitted electronically or to the CS office. Typed solutions preferred. If hand-written, solutions must be legible.
Transaction Management
For each of the following schedules, state which of the following properties hold: conflict serial- izable, recoverable, cascadeless, or strict. A schedule is strict if a value written by a transaction T is not read or overwritten by other transactions until T either aborts or commits. Please display your answer as a table with one row per schedule, and one column per property. Indicate the satisfied properties with a check mark. Reminder: a conflict serializable schedule is one that has no conflicting operations amongst its committed transactions. Aborted transactions are ignored when determining conflict serializ- ability.
(a) T1:W(X), T2:R(X), T1:W(X), T2:Commit, T1:Commit (b) T1:R(X), T2:W(X), T1:W(X), T2:Abort, T1:Commit (c) T1:R(X), T2:W(X), T1:W(X), T2:Commit, T1:Commit (d) T1:R(X), T2:R(X), T1:W(X), T1:Commit, T2:W(X), T2:Commit (e) T1:W(X), T2:R(X), T1:W(X), T2:Commit, T1:Abort (f) T1:W(X), T2:R(Y), T1:R(Y), T2:R(X), T1:Commit, T2:Commit (g) T1:R(X), T2:R(X), T1:Commit, T2:W(X), T2:Commit
Schedule Conflict serializable Recoverable Cascadeless Strict (a) (b)
(c)
(d)
(e)
(f )
(g)
(a) Consider the following schedule:
T1:R(A), T1:W(A), T2:R(A), T2:W(A), T2:R(B), T2:W(B), T2:Commit, T1:Abort i. Is this schedule allowed by Two Phase Locking? If not explain why. If so, show the schedule with lock requests and releases obeying 2PL. Allowed by 2PL. ii. Is this schedule allowed by Strict Two Phase Locking? If not explain why. If so, show the schedule with lock requests obeying Strict 2PL. Not allowed by Strict 2PL. (b) We call a transaction that only reads database objects a read-only transaction. Other- wise the transaction is called a read-write transaction. Give brief answers to the following questions: i. What is lock thrashing and when does it occur? Locking thrashing occurs when the database system reaches a point where adding another new active transaction actually reduces throughput due to competition for locking among all active transactions. Empirically, locking thrashing is seen to occur when 30% of active transactions are blocked. ii. What happens to the database system throughput if the number of read-write trans- actions is increased? If the number of read-write transaction is increased, the database system throughput will increase until it reaches the thrashing point; then it will decrease since read-write transactions require exclusive locks, thus resulting in less concurrent execution. iii. What happens to the database system throughput if the number of read-only transac- tions is increased? If the number of read-only transaction is increased, the database system throughput will also increase since read-only transactions require only shared locks. So we are able to have more concurrency and execute more transac- tions in a given time. iv. Describe three ways of tuning your system to increase transaction throughput. Throughput can be increased in three ways: