Definitioncore
Strict schedule
Also called strictness of schedules.
A schedule in which no item is read or overwritten until the last transaction that wrote it has committed or aborted.
A schedule is strict (ST) if no transaction reads or writes an item while another transaction that wrote the item earlier is still active. It is the smallest of the three recovery classes of Hadzilacos (1988): every strict schedule avoids cascading aborts and is recoverable. Its practical value is that an abort can be done physically, by writing back the old value of every item that the transaction wrote. Most lock based systems produce strict schedules, because strict two-phase locking does.
The word "strict" here is about aborts. It is not the same as strict serializability, which is serializability plus the real-time order of transactions that do not overlap; see external consistency and linearizability.
Definition
Definition (Hadzilacos 1988). A schedule is strict if for all , every item and every action :
ST denotes the class.
The last writer is enough. The summary speaks of the last writer of . The two forms are the same. Proof. The definition implies the last-writer form at once. For the other direction, assume the last-writer form. We show the definition for by induction on its position in . Let with , and let be the last write of before . If , the last-writer form says that ended before . If , then , and is an earlier action of a transaction other than . By the induction hypothesis for , ended before , so also before .
ST is inside ACA, and the inclusion is strict. Proof. If reads from , then and has not aborted before . Strictness gives , which is the ACA condition. The schedule reads nothing, so it is in ACA, and it is not strict.
Recovery by before images. The before image of is the value of just before that write. Undo by writing back the before images of the writes of , last write first. Claim: if is strict, this gives every item the value of its last write by a transaction that did not abort, or its initial value if there is none. Proof sketch. Fix and the first write of . By strictness, every earlier writer of ended before , so (by induction on the number of aborts) the value just before is the last write of by a committed transaction, or the initial value. By strictness again, no other transaction writes between and . So restoring the before image of the first write of , which the reverse order does last, gives the right value.
Without strictness this fails. Take and . The undo of writes back , and the undo of then writes back , the value of an aborted transaction. The right final value is .
Basic facts.
- Prefix closed. The condition on an action depends only on the actions before it.
- How a scheduler gets ST. Hold every exclusive lock until commit or abort, as strict two-phase locking does. Then any after needs a lock that conflicts with the exclusive lock of , and it gets that lock only after has ended. Read locks may be released earlier.
- Not a serializability condition. A strict schedule need not be conflict serializable. Strict two-phase locking gives both, because the two-phase rule gives serializability and the long exclusive locks give strictness.
Examples and non-examples
Examples.
- is strict.
- is strict: a write after a read of an active transaction is allowed. The condition only looks at earlier writes.
- is strict and is a lost update. With and , six of the 20 complete schedules are strict, and four of them are not conflict serializable.
- is strict but not conflict serializable: on and on .
Non-examples.
- is in ACA but not strict: overwrites while is active. This is the dirty write.
- is recoverable, not in ACA and so not strict.
- is not strict, although no transaction reads anything and the schedule is serializable.
Related definitions
- Cascadeless schedules (ACA) forbid only the dirty read. Recoverable schedules (RC) only order the commits. ST ACA RC.
- Rigorous schedules (Breitbart, Georgakopoulos, Rusinkiewicz and Silberschatz 1991) add the mirror rule for reads: if with , then ended before . So no two conflicting actions of active transactions ever overlap. A rigorous schedule is strict, and its committed projection is conflict serializable in commit order. Proof. For committed and conflicting actions , rigor gives . So every arc of the conflict graph goes from the earlier to the later commit, and the commit order is a topological order. Strong strict two-phase locking, which holds all locks until the end, produces rigorous schedules. The same argument shows that rigorous schedules satisfy commitment ordering: conflicting committed transactions commit in the order of their conflicts.
- Strict serializability has nothing to do with this class. It is serializability in an order that respects real time, the database analogue of linearizability.
- Undo logs and write-ahead logging store before images. Strictness is what makes those before images enough to undo an aborted transaction at the item level.
References
- Vassos Hadzilacos, A theory of reliability in database systems, Journal of the ACM 35(1), 1988, pages 121 to 145, strict histories, their place inside the cascadeless class, and recovery by before images
- Philip A. Bernstein, Vassos Hadzilacos and Nathan Goodman, Concurrency Control and Recovery in Database Systems, Addison-Wesley, 1987, Chapter 1 (strict executions and before images) and Chapter 2 (strict histories)
- Yuri Breitbart, Dimitrios Georgakopoulos, Marek Rusinkiewicz and Abraham Silberschatz, On rigorous transaction scheduling, IEEE Transactions on Software Engineering 17(9), 1991, pages 954 to 960, the definition of rigorous schedules and their properties
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 4T8VBW Edit this page History Report an error Markdown