Recovery System
Recovery System
Transaction failure :
⚫ Logical errors: transaction cannot complete due to some internal error condition.
System crash: a power failure or other hardware or software failure causes the system to
crash.
Disk failure: a head crash or similar disk failure destroys all or part of disk storage
Stable storage:
A mythical form of storage that survives all failures
Approximated by maintaining multiple copies on distinct non volatile media
Stable-Storage Implementation
Failure during data transfer can still result in inconsistent copies : Block transfer can
result in
• Successful completion
• Partial failure: destination block has incorrect information
• Total failure: destination block was never updated
Protecting storage media from failure during data transfer (one solution):
Execute output operation as follows (assuming two copies of each block):
1. Write the information onto the first physical block.
2. When the first write successfully completes, write the same information onto the
second physical block.
3. The output is completed only after the second write successfully completes.
Log-Based Recovery
• Log record notes that Ti has performed a write on data item Xj Xj had value
V1 before the write, and will have value V2 after the write.
When Ti finishes it last statement, the log record <Ti commit> is written.
We assume for now that log records are written directly to stable storage
THANK YOU.