Question Details

Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?


Options

A

R1(X), W2(X), W1(Y), W2(Y), R1(X), W1(X), COMMIT(T2), COMMIT(T1)

B

W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

C

R1(X), W1(Y), W2(X), W2(Y), R1(X), W1(X), COMMIT(T1), COMMIT(T2)

D

W2(X), R1(X), W1(Y), W2(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

Show Answer
Correct Answer
B
W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

Solution :

The correct schedule that is conflict serializable is:
W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

Image Analysis:
Based on the provided image, we can identify two transactions and their list of sequential operations:
1. Transaction T1: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1)
2. Transaction T2: The first operation is labeled as W1(X) in the image (which is a typo for W2(X) since it belongs to Transaction T2), followed by W2(Y), and then COMMIT(T2).

Concept of Conflict Serializability:
A schedule is conflict serializable if it is conflict equivalent to a serial schedule. We determine this by constructing a precedence graph where the transactions are nodes, and directed edges are added between transactions if they have conflicting operations. Two operations from different transactions conflict if they access the same data item and at least one of them is a write operation (W). If the precedence graph has no cycles, the schedule is conflict serializable.

Let us analyze the conflicting operations in the correct schedule:

S = W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

1. Conflicts on data item X:
- W2(X) in T2 occurs before R1(X) in T1. This creates a precedence edge:
T2→T1
- W2(X) in T2 occurs before W1(X) in T1. This also yields the same edge:
T2→T1

2. Conflicts on data item Y:
- W2(Y) in T2 occurs before W1(Y) in T1. This creates a precedence edge:
T2→T1

Combining all the conflicts, the precedence graph contains only a single directed edge:
T2→T1
Since there are no cycles in the precedence graph, the schedule is conflict serializable (equivalent to the serial order T2 followed by T1).

Why other options are not conflict serializable:
- For R1(X), W2(X), W1(Y), W2(Y), R1(X), W1(X)...: R1(X) occurs before W2(X) (giving T1→T2), but W2(X) occurs before W1(X) (giving T2→T1), creating a cycle.
- For R1(X), W1(Y), W2(X), W2(Y), R1(X), W1(X)...: Similarly, R1(X) before W2(X) and W2(X) before W1(X) creates a cycle between T1 and T2.
- For W2(X), R1(X), W1(Y), W2(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1): Here, W2(X) before R1(X) gives T2→T1 for X, but W1(Y) before W2(Y) gives T1→T2 for Y, creating a cycle.

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • civil engineering

Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.

  • GATE
  • beginner
  • 3 hours
  • electronics and communication engineering

Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: