Serializability of Schedules MCQ Quiz in తెలుగు - Objective Question with Answer for Serializability of Schedules - ముఫ్త్ [PDF] డౌన్లోడ్ కరెన్
Last updated on Mar 17, 2025
Latest Serializability of Schedules MCQ Objective Questions
Top Serializability of Schedules MCQ Objective Questions
Serializability of Schedules Question 1:
Two transactions T1 and T2 are given as
T1 : r1 (X)w1 (X)r1 (Y)w1 (Y)
T2 : r2 (Y)w2 (Y)r2 (Z)w2 (Z)
Where ri(V) denotes a read operation by transaction Ti on a variable V and wi(V) denotes a write operation by transaction Ti on a variable V. The total number of conflict serializable schedules that can be formed by T1 and T2 is _________.Answer (Detailed Solution Below) 54
Serializability of Schedules Question 1 Detailed Solution
Concept:
Conflict serializable schedule which can be transformed in a serial schedule by swapping non conflicting operations. Two operations are conflicting: if they belong to different transactions and operate on same data. A conflict serializable schedule must be free from read-write, write-write, write-read conflicts.
Explanation:
In both transaction T1 and T2, common data item is Y. There can be conflict between T1 and T2 on data item Y.
FIRST SEQUENCE OF EXECUTION:
T1 executes first and then T2. There is conflict between r1(Y) and w2(Y). SO, either both the read and write of T1 on Y should be performed before read write pair of T2 or after read write pair of T2. Because in all other cases, it causes violation.
According to the, one serial arrangement is r1 (X)w1 (X)r1 (Y)w1 (Y), r2 (Y)w2 (Y)r2 (Z)w2 (Z)
As, there are total 8 operations, so total sequence possible = \(\frac{{8!}}{{4!4!}} = 70\)
Now find the schedules which have a cycle in the precedence graph or which violate the conflict serializability.
These operations are: r1(Y) w1(Y), r2(Y) w2(Y).
Sequences of operation possible from this are:
r1(Y) w1(Y), r2(Y) w2(Y). |
Possible |
r1(Y) r2(Y), w1(Y) w2(Y). |
No |
r1(Y) r2(Y), w2(Y) w1(Y). |
No |
r2(Y) w2(Y), r1(Y) w1(Y). |
Yes |
r2(Y) r1(Y), w2(Y) w1(Y). |
No |
r2(Y) r1(Y), w1(Y) w2(Y). |
No |
Consider the possible sequences as core sequence and then find the other sequences.
Out of the total, 16 schedules are not possible in this way.
Total conflict serializable schedule that are possible = 70 – 16 = 54
Serializability of Schedules Question 2:
Consider the following database schedule with three transactions, T1, T2, and T3.
S = r1(X) r2(Y) r3(Y) w2(Y) w1(X) w3(X) r2(X) w2(X);
where ri(X) and ri(Y) denotes a read operation on data items X and Y respectively and wi(X) and wi(Y) denotes a write operation on data items X and Y respectively by transaction Ti.Answer (Detailed Solution Below)
Serializability of Schedules Question 2 Detailed Solution
T1 |
T2 |
T3 |
r(X) |
|
|
|
r(Y) |
|
|
|
r(Y) |
|
w(Y) |
|
w(X) |
|
|
|
|
w(X) |
|
r(X) |
|
|
w(X) |
|
Since there is no cycle in the precedence graph. Therefore, the schedule S is serializable.
T1 does not depend on any other transaction
∴ T1 will execute first in serializable
T2 depends on both T1 and T3 any other transaction
∴ T2 will execute last in serializable
∴ order: T1 → T3 → T2
Serializability of Schedules Question 3:
Consider the following database schedule with two transactions, T1 and T2.
S = r1(X) r2(Y) w1(X) r2(Z) r1(Y) w2(Y)w1(Y) w2(Z) a1; a2;
where ri(A) denotes a read operation by transaction Ti on a variable Z, wi(B) denotes a write operation by Ti on a variable Z and ai denotes an abort by transaction Ti.
Which one of the following statements about the above schedule is TRUE?Answer (Detailed Solution Below)
Serializability of Schedules Question 3 Detailed Solution
Schedule S:
T1 |
T2 |
r(X) |
|
|
r(Y) |
w(X) |
|
|
r(Z) |
r(Y) |
|
|
w(Y) |
w(Y) |
|
|
w(Z) |
a1 |
|
|
a2 |
Since there is a cycle in the precedence graph. Therefore, the schedule S is not conflict serializable.
Scenarios may lead to irrecoverable:
A transaction read a data item after it has been written by an uncommitted transaction.
Since we cannot have such scenarios and hence it is recoverable.Serializability of Schedules Question 4:
Which of the following is/are true?
Answer (Detailed Solution Below)
Serializability of Schedules Question 4 Detailed Solution
Answer: Option 3, 4
Explanation:
Option 1: Every recoverable schedule is serializable.
This Option 1 is not true. Since there exist recoverable schedules that are not serializable.
Option 2: Every serializable schedule contains no conflicting actions.
This Option is also not true. There is no such restriction in serializability.
Option 3: Intially A = 100, B = 100
T1 |
R(B) |
R(A) |
A = A + 100 |
B = B + A |
W(A) |
B = B + 100 |
W(B) |
A = A + B |
W(A) |
COMMIT |
Option 4: In the transaction from Option 3, the final value of B is 400.
The final value of A is 600 after T1 completes.
In both Option 3 and Option 4
T1 |
R(B) |
R(A) |
A = A + 100 |
B = B + A |
W(A) |
B = B + 100 |
W(B) |
A = A + B |
W(A) |
COMMIT |
SO both Options are correct.
Hence Final values of A = 600 and B = 400.
Serializability of Schedules Question 5:
Consider the following schedule:
T1 |
T2 |
T3 |
|
R(X) |
|
R(Y) |
|
|
|
|
R(Z) |
|
|
W(Z) |
|
W(Y) |
|
R(X) |
|
|
How many conflict serializable schedules are possible for the transactions given above?
Answer (Detailed Solution Below)
Serializability of Schedules Question 5 Detailed Solution
We have to find all the conflicting operations in the given schedule. Here, R(Y) of T1 is conflicting with
W(Y) of T2. So, T2 must be executed after T1.
Other than this, there are no conflicting operations between any transaction. So, transaction can be
executed in any order except the T1 before T2.
So, possible conflict serializable schedules are:
T1 -> T2 -> T3
T3 -> T1 -> T2
T1 -> T3 -> T2
So, total 3 conflict serializable schedules are possible.
Serializability of Schedules Question 6:
Consider a schedule S of transactions T1 and T2:
T1 |
|
R(X) |
W(X) |
|
R(W) |
|
R(Z) |
|
commit |
|
T2 |
R(Y) |
|
|
R(Z) |
|
W(W) |
|
W(X) |
|
commit |
In the above transactions, R(X) stands for read data item X and W(X) stands for write data item X. Also, WAW stands for write after write, and WAR stands write after read.
Which one of the following is/are TRUE about the above schedule?
Answer (Detailed Solution Below)
Serializability of Schedules Question 6 Detailed Solution
T1 → T2 :
R(X) → W(X)
W(X) → W(X)
R(W)→ W(W)
Since there is no cycle in the precedence graph. Therefore, schedule S is conflict serializable.
Option 3: Commit of T2 before commit of T1 is not allowed
It is allowed and hence option 3 is false
Serializability of Schedules Question 7:
Two transactions T1 and T2 are given as
T1: R1(A)W1(A)
T2:R2(A)W2(A)
Where Ri(A)denotes a read operation by transaction Ti on a variable A and Wi(A)denotes a write operation by transaction Ti on a variable A. The total number of conflict serializable schedules that can be formed by T1 and T2 is ______.Answer (Detailed Solution Below) 2
Serializability of Schedules Question 7 Detailed Solution
S1
T1 |
T2 |
R(A) |
|
W(A) |
|
|
R(A) |
|
W(A) |
Since there is no cycle in the precedence graph. Therefore, the schedule S1 is conflict serializable.
S2
T1 |
T2 |
|
R(A) |
|
W(A) |
R(A) |
|
W(A) |
|
Since there is no cycle in the precedence graph. Therefore, the schedule S2 is conflict serializable.
S3
T1 |
T2 |
R(A) |
|
|
R(A) |
W(A) |
|
|
W(A) |
Since there is cycle in the precedence graph. Therefore, the schedule S3 is not conflict serializable.
S4
T1 |
T2 |
|
R(A) |
R(A) |
|
|
W(A) |
W(A) |
|
Since there is cycle in the precedence graph. Therefore, the schedule S4 is not conflict serializable.
S5
T1 |
T2 |
R(A) |
|
|
R(A) |
|
W(A) |
W(A) |
|
Since there is cycle in the precedence graph. Therefore, the schedule S4 is not conflict serializable.
S6
T2 |
T1 |
|
R(A) |
R(A) |
|
W(A) |
|
|
W(A) |
Since there is cycle in the precedence graph. Therefore, the schedule S6 is not conflict serializable.
∴ Conflict serializable: S1 and S2
∴ Not Conflict serializable: S3, S4, S5 and S6
Important Points:
Number of schedule possible = \(\frac{{\left( {2 + 2} \right)!}}{{2! \times 2!}} = 6\)
Number of serial schedules = 2! = 2
S1 and S2 is serial schedule
Serial schedule is always conflict serializableSerializability of Schedules Question 8:
For the given transaction, which of the following is correct?
T1 |
T2 |
T3 |
|
R(B) |
|
|
R(A) |
|
W(B) |
|
|
W(A) |
|
|
|
W(A) |
|
W(A) |
Answer (Detailed Solution Below)
Serializability of Schedules Question 8 Detailed Solution
i) Conflict serializability Check →
Pairs are conflicting pairs
∴ Not conflict serializable
ii) View serializalabity check →
Initial Read of A & B is by T2
Final write of A & B b) T3 & T1 respectively.
∴ View serializable schedule must be T2 → T1 → T3
Thus, c is the correct answer
Serializability of Schedules Question 9:
Consider the following schedules:
S1: R2(A),R1(C),R2 (B),W2 (B),R3(B),R1(A),R3(C),W3 (C),W1(A)
S2: R2(A),R1(C),R2 (B), R3(B),W2(B) , R1(A),R3(C),W3 (C),W1(A)
Which of the above schedule is/are conflict serializable?
Answer (Detailed Solution Below)
Serializability of Schedules Question 9 Detailed Solution
Schedule S1: R2(A),R1(C),R2 (B),W2 (B),R3(B),R1(A),R3(C),W3 (C),W1(A)
S1 |
||
T1 |
T2 |
T3 |
|
R(A) |
|
R(C) |
|
|
|
R(B) |
|
|
W(B) |
|
|
|
R(B) |
R(A) |
|
|
|
|
R(C) |
|
|
W(C) |
W(A) |
|
|
Precedence graph of S1:
Schedule S2: R2(A),R1(C),R2 (B), R3(B),W2(B), R1(A),R3(C),W3(C),W1(A)
S2 |
||
T1 |
T2 |
T3 |
|
R(A) |
|
R(C) |
|
|
|
R(B) |
|
|
|
R(B) |
|
W(B) |
|
R(A) |
|
|
|
|
R(C) |
|
|
W(C) |
W(A) |
|
|
Precedence graph of S2:
The precedence graph of S1 has no cycle hence conflict-serializable whereas precedence graph of S2 consists of cycle hence not conflict-serializable.
Serializability of Schedules Question 10:
How many number of serial schedules are possible for the following concurrent schedule ?
T1 |
T2 |
T3 |
T4 |
|
|
|
R(A) |
|
R(A) |
|
|
|
|
R(A) |
|
W(B) |
|
|
|
|
W(A) |
|
|
|
|
R(B) |
|
|
W(B) |
|
|
Answer (Detailed Solution Below) 24
Serializability of Schedules Question 10 Detailed Solution
Number of serial schedules = It is all possible permutations of n transactions = N!
So here the number of transactions is 4.
Number of serial schedules = 4! = 24.
Hence, the correct answer is 24.