Hw4 - 3 (y); w 3 (y) S 1 : r 1 (x); r 2 (z); r 1 (z) ; r 3...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1. List all possible schedules for transactions T 1 and T 2 from figure 20.2, and determine which are conflict serializable (correct) and which are not. 2. Which of the following schedules is (conflict) serializable? For each serializable schedule, determine the equivalent serial schedules. a. r 1 (X); r 3 (X); w 1 (X); r 2 (X); w 3 (X) b. r 1 (X); r 3 (X); w 3 (X); w 1 (X); r 2 (X) c. r 3 (X); r 2 (X); w 3 (X); r 1 (X); w 1 (X) d. r 3 (X); r 2 (X); r 1 (X); w 3 (X); w 1 (X) 3. Consider the three transactions T 1 , T 2 , and T 3 , and the schedules S 1 and S 2 given below. Draw the serializibility (precedence) graphs for S 1 and S 2 and state whether each schedule is serializable or not. If a schedule is serializable, write down the equivalent serial schedule(s). T 1 : r 1 (x); r 1 (z); w 1 (x) T 2 : r 2 (z); r 2 (y); w 2 (z); w 2 (y) T 3 : r 3 (x); r
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3 (y); w 3 (y) S 1 : r 1 (x); r 2 (z); r 1 (z) ; r 3 (x); r 3 (y); w 1 (x); w 3 (y); r 2 (y); w 2 (z); w 2 (y) S 2 : r 1 (x); r 2 (z); r 3 (x); r 1 (z); r 2 (y); r 3 (y); w 1 (x); w 2 (z); w 3 (y); w 2 (y) 4. Discuss the problems of deadlock and starvation, and the different approaches to dealing with these problems. 5. Discuss the wait-die and wound-wait protocols for deadlock prevention. 6. Prove that the basic two-phase locking protocol guarantees conflict serializability of schedules. (Hint: Show that, if a serializability graph for a schedule has a cycle, then at least one of the transactions participating in the schedule does not obey the two-phase locking protocol.)...
View Full Document

Ask a homework question - tutors are online