Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Serializability & Conflict Serializability - Computer Science Engineering (CSE) MCQ

Test: Serializability & Conflict Serializability - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test - Test: Serializability & Conflict Serializability

Test: Serializability & Conflict Serializability for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: Serializability & Conflict Serializability questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Serializability & Conflict Serializability MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Serializability & Conflict Serializability below.
Solutions of Test: Serializability & Conflict Serializability questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: Serializability & Conflict Serializability solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Serializability & Conflict Serializability | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Serializability & Conflict Serializability - Question 1

Which of the following is the most expensive method?

Detailed Solution for Test: Serializability & Conflict Serializability - Question 1

Predicate locking is the most expensive method and is generally not used in most databases.

Test: Serializability & Conflict Serializability - Question 2

The set of ________ in a precedence graph consists of all the transactions participating in the schedule

Detailed Solution for Test: Serializability & Conflict Serializability - Question 2

The set of vertices in a precedence graph consists of all the transactions participating in the schedule. Precedence graph is a simple and efficient way of determining conflict serializability of the schedule.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Serializability & Conflict Serializability - Question 3

If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are

Detailed Solution for Test: Serializability & Conflict Serializability - Question 3

If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are conflict equivalent. Not all serial schedules are conflict equivalent to each other.

Test: Serializability & Conflict Serializability - Question 4

A ___________of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph.

Detailed Solution for Test: Serializability & Conflict Serializability - Question 4

A Serializability order of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph. This process is called as topological sorting.

Test: Serializability & Conflict Serializability - Question 5

A schedule is __________ if it is conflict equivalent to a serial schedule.

Detailed Solution for Test: Serializability & Conflict Serializability - Question 5

A schedule is conflict serializable if it is conflict equivalent to a serial schedule. The concept of conflict equivalence leads to the concept.

Test: Serializability & Conflict Serializability - Question 6

I and J are _________ if they are operations by different transactions on the same data item, and at least one of them is a write operation.

Detailed Solution for Test: Serializability & Conflict Serializability - Question 6

I and J are conflicting if they are operations by different transactions on the same data item, and at least one of them is a write operation.

Test: Serializability & Conflict Serializability - Question 7

Consider the following transaction with data items P and Q initialized to zero:

T1 : read  (P) ;
read  (Q) ;
if P = 0 then Q : = Q + 1;
write (Q) ;
T2 : read  (Q) ;
read (P) ;
if Q = 0 then P : = P + 1 ;
write  (P) ;

Q. Any non-serial interleaving of T1 and T2 for concurrent execution leads to

Detailed Solution for Test: Serializability & Conflict Serializability - Question 7

Concept:

Two or more actions are said to be in conflict if:

  • The actions are associated with various transactions.
  • A write operation is involved in at least one of the operations.
  • The actions all refer to the same thing (read or write).

If the following conditions are met, the schedules S1 and S2 are said to be conflict-equivalent:

  • The transactions in schedules S1 and S2 are the same (including ordering of actions within each transaction).
  • In both S1 and S2, the order of each pair of conflicting actions is the same.

Conflict-serializable:

A schedule is said to be conflict-serializable when the schedule is conflict-equivalent to one or more serial schedules.  Conflict-serializability is that a schedule is conflict-serializable if and only if its precedence graph/serializability graph, when only committed transactions are considered, is acyclic.

There are two possible serial schedules:

  • T1 followed by T2.
  • T2 followed by T1.

As an initial step in both serial schedules, one of the transactions reads the value written by the other transaction. As a result, any non-serial T1 and T2 interleaving will not be conflict serializable.

Hence the correct answer is a schedule that is not conflict serializable.

Test: Serializability & Conflict Serializability - Question 8

Consider the following transactions with data items P and Q initialized to zero:

T1 :read (P);
read (Q);
if P = 0 then Q := Q + 1 ;
write (Q).
T2 : read (Q);
read (P);
if Q = 0 then P := P + 1 ;
write (P).

Q. Any non-serial interleaving of T1 and T2 for concurrent execution leads to

Detailed Solution for Test: Serializability & Conflict Serializability - Question 8

P and Q are initialized to Zero, write operation on P and Q will be executed.
Consider any non-serial schedule like R1(P), R2(Q), R1(Q), R2(P), W1(Q), W2(P). R1(P) conflicts with W2(P) Hence T1 must be before T2. R2(Q) conflicts with W1(Q) Hence T2 must be before T1. There is no serial schedule that satisfies both of them hence it does not conflict with serializable.
Hence the correct answer is a schedule that is not conflict serializable.

Test: Serializability & Conflict Serializability - Question 9

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? 

Detailed Solution for Test: Serializability & Conflict Serializability - Question 9

Serial schedule is possible only when precedence graph doesn’t contain cycle. If precedence graph contains a cycle, it means schedule is not conflict serializable.
Breadth first search and Depth first search of a graph are possible even if graph contains cycle.
Topological sort in a graph will not work if graph contains a cycle.

Consider a directed acyclic graph:

 

Here Two orders possible: V2, V3, V1, V4, V5, V6 OR V3, V2, V1, V4, V5, V6.
In case of ascending order of transaction indices, two non-conflicting schedules can occur simultaneously.

Test: Serializability & Conflict Serializability - Question 10

Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti. Consider the following two schedules.

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 one of the following options is correct?

Detailed Solution for Test: Serializability & Conflict Serializability - Question 10

S1: r1(x) r1(y) r2(x) r2(y) w2(y) w1(x)

Precedence Graph:

S2:r1(x) r2(x) r2(y) w2(y) r1(y) w1(x)

Precedence Graph:

There exists a Cycle in Precedence of S1. Hence S1 is not Conflict Serializable.

Whereas S2 is Conflict Serializable.

Information about Test: Serializability & Conflict Serializability Page
In this test you can find the Exam questions for Test: Serializability & Conflict Serializability solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Serializability & Conflict Serializability, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)