The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+13 votes
1k views

Consider two transactions $T_1$ and $T_2$, and four schedules $S_1, S_2, S_3, S_4$,  of  $T_1$  and  $T_2$ as given below:

$T_1: R_1[x]W_1[x]W_1[y]$

$T_2: R_2[x]R_2[y]W_2[y]$

$S_1: R_1[x]R_2[x]R_2[y] W_1[x] W_1[y] W_2[y]$

$S_2: R_1[x]R_2[x]R_2[y] W_1[x] W_2[y] W_1[y]$

$S_3: R_1[x]W_1[x]R_2[x] W_1[y] R_2[y] W_2[y]$

$S_4: R_2[x]R_2[y]R_1[x] W_1[x] W_1[y] W_2[y]$

Which of the above schedules are conflict-serializable?

  1. $S_1 \text{ and } S_2$
  2. $S_2 \text{ and } S_3$
  3. $S_3$ only
  4. $S_4$ only

 

asked in Databases by Veteran (69k points)
edited by | 1k views

1 Answer

+18 votes
Best answer
The answer is B.

S1 has a cycle from T1-->T2 and T2-->T1.

S2-- . It is uni-directional and has only T2-->T1.

S3-- It is uni-directional and has only T1-->T2.

S4-- same as S1.

A schedule is conflict serializable if there is no cycle in the directed graph made by the schedules.

In the schedules we check for RW, WR, WW conflicts between the schedules. and these conflicts only contribute in the edges of the graph.
answered by Veteran (19.8k points)
selected by
Ans will be c because
no. it's b) you can check it by precednce graph.
Thanks @Sandeep for correction
I got the answere by drawing schedules but why T1 and T2 is given...??
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

33,687 questions
40,230 answers
114,268 comments
38,795 users