Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE-CS-2016 (Set 2) | Question 32

  • Last Updated : 28 Jun, 2021
Geek Week

Suppose a database schedule S involves transactions T1, ….Tn. Construct the precedence graph of S with vertices representing the transactions and edges representing the conflicts. If S is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?

(A) Topological order
(B) Depth-first order
(C) Breadth-first order
(D) Ascending order of transaction indices

Answer: (A)

Explanation: Cycle in precedence graph tells that schedule is not conflict serializable. DFS and BFS traversal of graph are possible even if graph contains cycle. And hence DFS and BFS are also possible for non serializable graphs. But Topological sort of any cyclic graph is not possible. Thus topological sort guarantees graph to be serializable . Option D is not valid because in a transaction with more indices might have to come before lower one. Also two non- conflicting schedule can occur simultaneously.

This explanation has been contributed by Abhishek Kumar.

Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :