0% found this document useful (0 votes)
19 views8 pages

Recovery System

The document discusses database recovery systems. It describes different types of failures like transaction failures from logical or system errors, and system crashes. It explains the fail-stop assumption and how disk failures are detected. It discusses recovery algorithms that ensure consistency and atomicity during normal processing and after failures. It describes volatile and non-volatile storage, and how stable storage is approximated. It provides an example of maintaining multiple copies on separate disks for stable storage implementation. Finally, it introduces log-based recovery where a log of update activities is maintained on stable storage.

Uploaded by

Vivek Bhoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views8 pages

Recovery System

The document discusses database recovery systems. It describes different types of failures like transaction failures from logical or system errors, and system crashes. It explains the fail-stop assumption and how disk failures are detected. It discusses recovery algorithms that ensure consistency and atomicity during normal processing and after failures. It describes volatile and non-volatile storage, and how stable storage is approximated. It provides an example of maintaining multiple copies on separate disks for stable storage implementation. Finally, it introduces log-based recovery where a log of update activities is maintained on stable storage.

Uploaded by

Vivek Bhoi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Recovery System

 Name- Vivek Namdev Bhoi


 Roll No.- 53
 Sub- DBMS
 Classification of Failure
 Failure Classification

Transaction failure :
⚫ Logical errors: transaction cannot complete due to some internal error condition.

⚫ System errors: the database system must terminate an active transaction


due to an error condition (e.g., deadlock).

System crash: a power failure or other hardware or software failure causes the system to
crash.

Fail-stop assumption: non-volatile storage contents assumed to not be corrupted


by system crash
Database systems have numerous integrity checks to Prevent corruption of disk data

Disk failure: a head crash or similar disk failure destroys all or part of disk storage

Destruction is assumed to be detectable: disk drives use checksums to detect failure


 Recovery Algorithms

Recovery algorithms are techniques to ensure database consistency and


transaction atomicity and durability despite failures

Recovery algorithms have two parts


1. Actions taken during normal transaction processing to ensure enough information
exists to recover from failures
2. Actions taken after a failure to recover the database contents to a state that ensures
atomicity, consistency and durability
 Storage Structure
Volatile storage:
Does not survive system crashes
Examples: main memory, cache memory

Non volatile storage:


• Survives system crashes
• Examples: disk, tape, flash memory, non-volatile (battery backed up) RAM

Stable storage:
A mythical form of storage that survives all failures
Approximated by maintaining multiple copies on distinct non volatile media
 Stable-Storage Implementation

Maintain multiple copies of each block on separate disks


⚫ Copies can be at remote sites to protect against disasters such as fire or flooding.

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

 A log is kept on stable storage.


• The log is a sequence of log records, and maintains a record of update activities on the
database.
 When transaction Ti starts, it registers itself by writing a <Ti start>log record
Before Ti executes write(X), a log record <Ti, X, V1, V2> is written, where V1 is the
value of X before the write, and V2 is the value to be written to X.

• 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.

You might also like