Details of this Paper

Database System

Description

solution


Question

All I need just answers for those Questions;1- Let T1 have the operations r(y), w(y) and T2 have the operations r(y), w(y), r(x), w(x). Consider the;dierent possible concurrent schedules for T1 and T2. From among these possible schedules;(a) Give two examples of schedules which are conflict serializable (but not serial). Explain why these are conflict serializable by drawing the precedence graph, these should not have a cycle. No other explanation needed.;(b) Give two examples of schedules which are not conflict serializable. Explain why these are not conflict;serializable by drawing the precedence graph, these should have a cycle. No other explanation needed.;2- Let T1 have the operations r(x), w(x), r(y), w(y) and T2 have the operations r(x), w(x). Consider;adding either a commit or abort to each of the transactions T1 and T2 and consider the dierent possible;concurrent (not serial) schedules. From among these dierent possible concurrent schedules (with either a;commit or abort added), give examples of;(a) A schedule which is non-recoverable.;(b) A schedule which is recoverable but is not strict.;(c) A schedule which is strict, but not serial.;Note that you are free to add either a commit or an abort to T1 and either a commit or an abort to T2 for each;of the above problems i.e. in one you may decide to add commits to both T1 and T2, in another an abort to T1 but a commit to T2 etc.;3- (a) Give an example where strict 2 phase locking is followed but the resulting schedule leads to deadlock. Explain why the 2PL being followed here is strict, and explain why there is deadlock.;(b) Give an example where conservative 2 phase locking is followed but the resulting schedule is not strict.;Explain why the 2PL being followed here is conservative, and explain why the resulting schedule is not strict.;4-For each of these, you have to give a convincing argument as to why the stated claim is true. It is;not enough just to give an example. However, if you like, you can use an example to illustrate your convincing argument.;(a) Show that the basic two-phase locking protocol guarantees conflict serializability.;(b) Show that the conservative two-phase locking protocol guarantees that there will be no deadlock.;(c) Show that the wound-wait protocol guarantees that there will be no deadlock and no starvation.;5- For each of the following locking protocols, assuming that every transaction follows that locking;protocol, state which of these desirable properties are ensured;(1), conflict-serializability;(2) recoverability;(3)avoidance of cascading rollbacks;(4) strict schedules.;You don't have to give any explanations, just state for each of (1),(2),(3), (4) YES or NO. For example, your answer might be (1) YES, (2) NO (3) NO (4) YES.;(a) Always obtain an exclusive lock before writing, hold exclusive locks until end-oftransaction. In addition;obtain a shared lock before reading, shared locks can be released at any time.;(b) Always obtain an exclusive lock before writing, hold exclusive locks until end-oftransaction. In addition;obtain a shared lock before reading, shared locks can be released at any time. In addition, locking is;two-phase.;(c) Always obtain an exclusive lock before writing, hold exclusive locks until end-oftransaction. No shared;locks are ever obtained i.e. don't need to get locks to read.

 

Paper#70514 | Written in 18-Jul-2015

Price : $47
SiteLock