Author | Message |
---|---|
kaancalstatela
Posts: 52
|
Posted 21:40 Jun 05, 2016 |
While attempting to solve the 4c), I realized that I've accidentally came up with a schedule that is both serializable and serial but not recoverable. But in the lecture slides, I saw a Venn diagram that clearly dictates serial schedules are both serializable and recoverable. Am I doing something wrong here? Any help would be appreciated. Thank you. |
kaancalstatela
Posts: 52
|
Posted 21:52 Jun 05, 2016 |
Here's an example of a schedule that's both serializable and serial but not recoverable. r1(x)w1(x)r1(y)r2(x)w2(x)w2(y) As you can see, the schedule is both serializable and serial. But Transaction 2 reads from the result of Transaction 1 on X, then attempts to write on it. So imagine r1(x)w1(x)r1(y)r2(x)w2(x)w2(y)c2a1 If we try to abort T1 after we commit t2, this is an unrecoverable schedule. But from the venn diagram, we see that serial schedules are both serializable and recoverable. Any chance someone can clarify this for me? Thank you.
update:
On the lecture slides, I've also seen an example such as the following: w1(x)r2(x)w2(x)c2a1 Now here, T2 is trying to read something X after T1 writes on it. So if T2 commits before T1 aborts, this results in an unrecoverable situation. As you can see, the schedule is both serializable and serial(there's only one write-read conflict but the precedence graph is acyclic so it's fine). I'm guessing this is acceptable because we're only looking at a small part of a bigger schedule where T1 continues and it's not only the w1(x) operation. Is that the right way to look at it? Because otherwise there's a conflict on the slides. Last edited by kaancalstatela at
22:02 Jun 05, 2016.
|
kaancalstatela
Posts: 52
|
Posted 22:02 Jun 05, 2016 |
updated earlier post Last edited by kaancalstatela at
22:03 Jun 05, 2016.
|
cysun
Posts: 2935
|
Posted 09:09 Jun 06, 2016 |
It's not serial because r1(x)...w2(y),c2,a1. And serializability only considers read and write operations. Recoverability also takes into account commit and abort. |