The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
1.2k views
Consider following schedules involving two transactions:
S1: r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X)
S2: r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X)
Which of the following statement is true?
A. Both S1 and S2 are conflict serializable.
B. S1 is conflict serializable and S2 is not conflict serializable.
C. S1 is not conflict serializable and S2 is conflict serializable.
D. Both S1 and S2 are not conflict serializable.
asked in CBSE/UGC NET by Active (3.9k points) | 1.2k views

1 Answer

+2 votes

Ans will be C

conflict serializable means we can first run one Transactioon then after it second without any conflict 

conflict occurs when data item is same and at least one operation is read

so for S1    r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X)   

here w1(x) can not be placed before r2(X)  as data item is common(X) and one operation is write so it is not conflict serializable

now for S2   r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X)

here r1(X) can be placed after w2(Y) as data item is different and before that only read operation are there so it is conflict serializable as T2 can be executed before T1

answered by Boss (48.8k points)


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

37,963 questions
45,466 answers
131,323 comments
48,379 users