Question

For the system given in figure 3 identify if schedule 2 is conflict equivalent and view...

For the system given in figure 3 identify if schedule 2 is conflict equivalent and view equivalent
to schedule 1. Give proper reasons for you answer.
Resolve the issues in schedule 2 by adopting appropriate locking scheme and
apply deadlock prevention scheme to ensure prevention of deadlocks and starvation. (7)

Table 2:Serial Schedule 1
T1   T2   T3   T4   T5
               Read(X)
               Read(Z)
               Read(Y)
               Write(Z)
               Write(Y)
               Write(Z)
   Read(Y)          
   Read(Z)          
Read(Y)              
Read(X)              
       Write(Y)      
       Write(Z)      
       Write(W)      
           Read(W)  
              

Table 3:Schedule 2
T1   T2   T3   T4   T5
               Read(X)
   Read(Y)          
Read(Y)              
       Write(Y)      
       Write(Z)      
               Read(Z)
   Read(Z)          
Read(X)              
           Read(W)  
       Write(W)      
               Read(Y)
               Write(Z)
               Write(Y)
               Write(X)

Figure 3

⦁   In Figure 4 we show the log as it appears at three instances of time.
⦁   Show all the recovery actions in all three cases. (3)
< T0 Start>
<T0,A, 1000, 500>
<T0,B, 2000, 2500>
< T1 Start>
<T1,C, 2000,1500>
<T2 Start>
<T1,D, 3000,3500>
<T3 Start>
< T0 Commit>
<T2,F,400,300>
<T1,C, 1500,1250>
< T2,F,250,350>
<T1,A, 500,750>
< T1 Commit>
      


0 0
Add a comment Improve this question Transcribed image text
Answer #1

Step 1 :-

Schedule 1 is Conflict serializwble while schedule 2 is not conflict serializable because there is a cycle between T3 and T2 while for schedule 1 there is no cycle

There is conflict between Read -Write and write -read between T2 and T3 and T3 and T2 in schedule 2while its not happening in schedule 1

So, schedule 2 is not econflict equivalent to schedule 1

Step 2 :- we know that if the schedule is conflict serializable then it is also view serializable so need of checking view serializable for schedule 1

Step 3:-

Now we check view serializable for schedule 2

Case1 Initial read for item X,Y and X ilin schedule is T5

While for schedule 2 initial read for item X,Y and Z is T5,T2 and no intial read for z

In both schedule intial read is different so need to check for final write and updated read

We can conclude that schedule 2 is also not view equivalent to schedule 1

***********************************************************************************************************************************

IN CASE OF ANY DOUBT PLEASE ASK IN THE COMMENT SECTION

Add a comment
Know the answer?
Add Answer to:
For the system given in figure 3 identify if schedule 2 is conflict equivalent and view...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This comes from a class on databases (c) Transaction Processing Consider the following schedule: transaction TI...

    This comes from a class on databases (c) Transaction Processing Consider the following schedule: transaction TI Transaction T2 read(X) write(X) read(Y) write(Y) read write (Y) read (X) write read(W) write(W) read(Z) write(z) i. Is the schedule (conflict) serializable? If yes, give an equivalent serial schedule; if not, explain why not. ii. Add read-lock0, write-lock and unlock instructions to the schedule following the two-phase locking protocol. Is there deadlock present?

  • -Advanced Database- Consider the following transaction schedule, where time increases from top to bottom. T1 T2...

    -Advanced Database- Consider the following transaction schedule, where time increases from top to bottom. T1 T2 T3 T4 Read (X) Read(Y) Read(Z) Read(Y) Write(Y) Write(Z) Read(U) Read(Y) Write(Y) Read(Z) Write(Z) Read(U) Write(U) Answer the following questions: Draw the precedence graph of the above schedule. Is this schedule conflict serializable? If yes, show what serial schedule(s) it is equivalent to. If not, explain why. Is this schedule view serializable? If yes, show what serial schedule(s) it is equivalent to. If not,...

  • 1. What is the difference between Two-Phase Locking (2PL) and Strict Two-Phase Locking? What condition to Strict 2PL prevent that 2PL does not prevent? 2. What are deadlocks? What are two techniques...

    1. What is the difference between Two-Phase Locking (2PL) and Strict Two-Phase Locking? What condition to Strict 2PL prevent that 2PL does not prevent? 2. What are deadlocks? What are two techniques for detecting and resolving deadlocks? 3. In the figure below, R(X, y) means read database item X into variable y and W(X, y) means write variable y into database item y. Column T1 shows transaction T1's operations and column T2 shows T2's operations. Columns Aand_B show the values...

  • Consider the following schedule. The actions are prefixed with the transaction name and are listed in...

    Consider the following schedule. The actions are prefixed with the transaction name and are listed in the order they’re scheduled. S: T2:R(Y), T1:R(X), T1:W(X), T3:R(Y), T3:W(X), T1:W(Z), T2:R(X), T3:R(Z) a. Draw the dependency graph for S. b. Is S serializable? c. Is S conflict serializable? If so, what is the conflict equivalent serial schedule?

  • 2. Given the following three transactions T1 = r1(x); w1(y); T2 = r2(z); r2(y); w2(y); w2(x);...

    2. Given the following three transactions T1 = r1(x); w1(y); T2 = r2(z); r2(y); w2(y); w2(x); T3 = r3(z); w3(x); r3(y); Consider the schedule S = r1(x); r3(z); r2(z); w3(x); r2(y); r3(y); w2(y); w1(y); w2(x); a. Draw the precedence graph of schedule S, and label each edge with data item(s). b. Based on the precedence graph, determine whether S is conflict serializable and justify your answer. If it is serializable, specify all possible equivalent serial schedule(s).

  • 2. Given the following three transactions T1 = r1(x); w1(y); T2 = r2(z); r2(y); w2(y); w2(x); T3 ...

    2. Given the following three transactions T1 = r1(x); w1(y); T2 = r2(z); r2(y); w2(y); w2(x); T3 = r3(z); w3(x); r3(y); Consider the schedule S = r1(x); r3(z); r2(z); w3(x); r2(y); r3(y); w2(y); w1(y); w2(x); a. Draw the precedence graph of schedule S, and label each edge with data item(s). b. Based on the precedence graph, determine whether S is conflict serializable and justify your answer. If it is serializable, specify all possible equivalent serial schedule(s).

  • I want to calculate Y[2]=X[3]+X[4] I'm not sure that I wrote right codes. .text main ....

    I want to calculate Y[2]=X[3]+X[4] I'm not sure that I wrote right codes. .text main . la $50, x #get base address of x la $s1, y #get base address of y lw $to, 12 ($50)#get data from memory of x[3] lw $t1 , 1 6($50) #get data from memory of x[4] add $t2, $t0, $t1 sw $t2, 8($51 ) #store result to y[2] li $v0, 10 #exit program syscall data x: word 5, 1, 17,-4, 6, 3 y: .word...

  • 1. Given the spring-mass-damper system in the figure below T3 T1 T2 b2 b1 k3 (a) Find the equatio...

    1. Given the spring-mass-damper system in the figure below T3 T1 T2 b2 b1 k3 (a) Find the equations of motion for each of the masses 脳. Fi(s) (b) Assume F1 0 and find the transfer function (c) Assume Fs 0 and find the transfer function (d) Write the equations in matrix-vector form: M.ї + Bi + Kx-F where z is a 3 x 1 vector with the displacements r,2, r3 as components, M is the mass matrix, B is...

  • QUESTION 5 a) Define the Per Unit system and list three (3) main reasons of using Per Unit system...

    Per unit calculation QUESTION 5 a) Define the Per Unit system and list three (3) main reasons of using Per Unit systemm. (5 marks) b) A three-bus power with two generator system is shown in figure Q2 (b). The 3-phase power and line-line voltage ratings are given below Ti T2 J40 2 Gi G2 j25 Ω 25 Ω Ty Figure Q2 (b) GI: 750 MVA, 18 kV, X 7% G2: 750 MVA, 18 kV, X-15% Motor: 1500 MVA, 20 kV,...

  • 1) True|False: You are about to write your pseudocode for the program that will read many...

    1) True|False: You are about to write your pseudocode for the program that will read many time cards (with time in & out hours), and output the total regular hours and total overtime hours. The first step of your pseudocode can be    “ Set Total_regular_hours to zero”.     2)True|False: You are about to write your pseudocode for the program that will read many time cards (with time in & out hours), and output the total regular hours and total overtime...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT