edited by
1,899 views

1 Answer

5 votes
5 votes

This question is from a previous question.

https://gateoverflow.in/31867/how-many-recoverable-schedules-are-possible-from-t1-and-t2

nilamd answered the question correctly, i.e. 42

I am trying to explain the answer. As shown on the previous question, there are 51 recoverable schedules. All Cascadeless schedules are also Recoverable schedules. Thus, we need to find the Cascading Recoverable schedules and we can remove them from the Recoverable Schedules to get the possible number of cascadeless schedules.

Two cases arise again.

Case 1

T1 T2
r(x)  
r(y)  
w(x)  
  r(x)
  w(x)
w(y)  
commit  
  commit

Here, we can have the two last operations from T1 either before r2(x), between r2(x) and w2(x) or after w2(x). Also keep in mind that if you count the case where both w1(y) and commit1 come before r2(x) then it will become cascadeless schedule. We need to keep the schedule cascading but Recoverable. Number of possible ways of placing w1(y) and commit1 in different places is 5.

Case 2

T1 T2
  r(x)
  w(x)
r(x)  
r(y)  
w(x)  
w(y) commit
commit  
   

 Here also, we can have commit2 not before r1(x) since then it will also become cascadeless schedule and also commit2 cannot come after commit1 since then it will be Irrecoverable schedule. Number of possible places to have commit2 in different places is 4.

Thus, total number of cascading schedules is 5 + 4 = 9

Number of cascadeless schedules is 51 - 9 = 42

edited by

Related questions

0 votes
0 votes
1 answer
1
Harsh Saini_1 asked Dec 27, 2023
394 views
How many total $Conflict$ $Serializable$ $Schedules$ are possible that can be formed by $T1$ and $T2?$$T1:$ $r_1(A)$ $r_1(B)$ $w_1(B)$$T2:$ $r_2(B)$ $r_2(A)$ $w_2(B)$
4 votes
4 votes
1 answer
2
rahul sharma 5 asked Jul 12, 2017
1,218 views
Consider thw following transactions:-T1 :- r1(A) w1(A) r1(B) w1(B)T1 :- r2(A) w2(A) r2(B) w2(B)a) Number of schedules serializable as t1->t2?b) Number of schedules serial...
11 votes
11 votes
3 answers
3
rahul sharma 5 asked Jul 9, 2017
10,684 views
Number of schedules view equal to following schedule :- r1(A), w1(B), r2(A), w2(B), r3(A), w3(B)
1 votes
1 votes
5 answers
4
gatecrack asked Sep 5, 2018
1,466 views
is this is cascadeless?r1(X),w2(X),w1(X), abort2, commit1