Computer-Networks
September 12, 2024UGC NET CS 2008 Dec-Paper-2
September 13, 2024Transactions
Question 21 |
Consider two transactions T1 and T2, and four schedules S1, S2, S3, S4 of T1 and T2 as given below:
- T1 = R1[X] W1[X] W1[Y]
T2 = R2[X] R2[Y] W2[Y]
S1 = R1[X] R2[X] R2[Y] W1[X] W1[Y] W2[Y]
S2 = R1[X] R2[X] R2[Y] W1[X] W2[Y] W1[Y]
S3 = R1[X] W1[X] R2[X] W1[Y] R2[Y] W2[Y]
S1 = R1[X] R2[Y]R2[X]W1[X] W1[Y] W2[Y]
Which of the above schedules are conflict-serializable?
S1 and S2 | |
S2 and S3 | |
S3 only | |
S4 only |
Question 21 Explanation:
S1 has a cycle from T1→T2 and T2→T1
Schedule S2,
Dependency graph is,
So, there is no cycle.
Schedule S3,
Dependency graph is,
S4 also has a cycle T1→T2 and T2→T1.
So, S2 and S3 are conflict serializable.
Schedule S2,
Dependency graph is,
So, there is no cycle.
Schedule S3,
Dependency graph is,
S4 also has a cycle T1→T2 and T2→T1.
So, S2 and S3 are conflict serializable.
Correct Answer: B
Question 21 Explanation:
S1 has a cycle from T1→T2 and T2→T1
Schedule S2,
Dependency graph is,
So, there is no cycle.
Schedule S3,
Dependency graph is,
S4 also has a cycle T1→T2 and T2→T1.
So, S2 and S3 are conflict serializable.
Schedule S2,
Dependency graph is,
So, there is no cycle.
Schedule S3,
Dependency graph is,
S4 also has a cycle T1→T2 and T2→T1.
So, S2 and S3 are conflict serializable.
Subscribe
Login
0 Comments