25 votes 25 votes Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by $r(x)$ and $w(x)$ respectively. Which one of them is conflict serializable? $r_1(x)$; $r_2(x)$; $w_1(x)$; $r_3(x)$; $w_2(x)$; $r_2(x)$; $r_1(x)$; $w_2(x)$; $r_3(x)$; $w_1(x)$; $r_3(x)$; $r_2(x)$; $r_1(x)$; $w_2(x)$; $w_1(x)$; $r_2(x)$; $w_2(x)$; $r_3(x)$; $r_1(x)$; $w_1(x)$; Databases gatecse-2014-set1 databases transaction-and-concurrency conflict-serializable normal + – go_editor asked Sep 26, 2014 • retagged Jan 21 by Hira Thakur go_editor 8.8k views answer comment Share Follow See 1 comment See all 1 1 comment reply JAINchiNMay commented Jan 24, 2023 reply Follow Share option d is even serial schedule 0 votes 0 votes Please log in or register to add a comment.
Best answer 26 votes 26 votes (D) make precedence graph for all the options, for option (D) only graph will be acyclic, hence (D) is CSS. Manu Thakur answered Oct 9, 2014 • edited Oct 21, 2018 by kenzou Manu Thakur comment Share Follow See all 7 Comments See all 7 7 Comments reply pC commented Nov 30, 2015 reply Follow Share Is R - W a conflict ?? 0 votes 0 votes Prashant. commented Nov 30, 2015 reply Follow Share yup. only R -R is not conflict. 0 votes 0 votes pC commented Nov 30, 2015 reply Follow Share R=-W is conflict only when one more read is performed . It is called unrepeatable read. Is it NOt ? 0 votes 0 votes pC commented Nov 30, 2015 reply Follow Share Here there is No unrepeatable read in any of the 4 options . Then How can one get cycles in all the graphs . Could some one explain it in a nice manner . 0 votes 0 votes Prashant. commented Nov 30, 2015 reply Follow Share take node for evry transaction procedure is simple scan left to right for take first element => scan from 2nd elemnt to right for every r-w . w-w or w-r conflict in diffrent transaction thier is a edge take 2nd element => scan from 3rd elemnt to right for every r-w . w-w or w-r conflict in diffrent transaction thier is a edge do like this skip left side one elemnt evry time. if u found cycle then not css otherwise css. 8 votes 8 votes amolagrawal commented Jan 11, 2017 reply Follow Share @ Arjun Sir, I wrote D which was given wrong saying correct ans is 4 (GO Full length test). Can you please tell me what to write if similar situation arises in gate exam. 0 votes 0 votes Sandeep Suri commented Jan 27, 2017 reply Follow Share @amolagrawal same happened with mebut don't worry this will not happen in gate. 0 votes 0 votes Please log in or register to add a comment.
7 votes 7 votes In option D, there is no interleaving of operations. The option D has first all operations of transaction 2, then 3 and finally 1 There can not be any conflict as it is a serial schedule with sequence 2 --> 3 -- > 1 gaurav9822 answered Aug 26, 2016 gaurav9822 comment Share Follow See all 3 Comments See all 3 3 Comments reply Akanksha Kesarwani commented Dec 6, 2016 i reshown by Akanksha Kesarwani Jan 11, 2017 reply Follow Share when we make precedence graph for option C ,D only graph will be acyclic, then why option C is not correct ? 0 votes 0 votes ਜਗਮੀਤ commented Jan 10, 2017 reply Follow Share In option C there is a conflict in r1(x) -> w2(x) and w2(x) -> w1(x) which makes cycle! 0 votes 0 votes Akanksha Kesarwani commented Jan 11, 2017 reply Follow Share only option D is correct as there is no cycle in precedence graph, but in C there is cycle as there are conflicts in r1(x) -> w2(x) and w2(x) -> w1(x) which makes cycle! 4 votes 4 votes Please log in or register to add a comment.
0 votes 0 votes Option D is correct bcoz there is no cycle in it pranavbhosle_ answered Dec 20, 2023 pranavbhosle_ comment Share Follow See all 0 reply Please log in or register to add a comment.