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
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
ADVERTISEMENT