Question
Consider the following database schedule with two transactions, and .
where denotes a read operation by transaction on a variable , denotes a write operation by on a variable and denotes an abort by transaction .
Which one of the following statements about the above schedule is TRUE?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2016 answer key
Solution
Inspect the schedule for uncommitted reads and write-write dependencies to evaluate recoverability and cascading aborts.
Analyze the sequence of operations in schedule :
Check for Dirty Reads (Reading Uncommitted Writes):
- writes at step 4 (). Does read after step 4? Step 6 is , which is a write, not a read.
- writes at step 6 (). No read follows step 6.
- Neither transaction reads any data value written by the other transaction. Thus, there are NO dirty reads in .
Evaluate Schedule Properties:
- Recoverability: Since there are no dirty reads, no transaction reads uncommitted changes. Therefore, is recoverable.
- Cascading Aborts: A cascading abort occurs when the abort of one transaction forces another transaction to abort because of dirty read dependencies. Because no dirty reads exist, the abort of does not cause to abort. The abort is independent. Thus, does not have a cascading abort.
- Strictness: A schedule is strict if a transaction neither reads nor writes a data item until the last transaction that wrote it has committed or aborted. Here, writes at step 4, and writes at step 6 before aborts at step 7. Therefore, is not strict.
Therefore, statement C (' does not have a cascading abort') is TRUE.
C
Assuming that after is a read operation or causes cascading aborts, confusing write-write conflicts with dirty reads.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 2
- Question
- 61 of 65, printed as CS Q.51
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.