CRASH RECOVERY



Crash recovery: is the process by which the database is moved back to a consistent and usable state. This is done by rolling back incomplete transactions and completing committed transactions that were still in memory when the crash occurred. When a database is in a consistent and usable state, it has attained that is known as a "point of consistency". Following a transaction failure, the database must be recovered.

FAILURE CLASSIFICATION

To see where the problem has occurred, we generalize a failure into various categories, as follows

Transaction failure

A transaction has to abort when it fails to execute or when it reaches a point from where it can’t go any further. This is called transaction failure where only a few transactions or processes are hurt.

Conditions that can result in transaction failure include:

1. A power failure on the machine, causing the database manager and the database partitions on it to go down.

 2.      A hardware failure such as memory corruption, or disk, CPU, or network failure.

3.      A serious operating system error that causes DB to go down.

 

 Reasons for a transaction failure could be

 Logical errors − Where a transaction cannot complete because it has some code error or any internal error condition.

 System errors − Where the database system itself terminates an active transaction because the DBMS is not able to execute it, or it has to stop because of some system condition. For example, in case of deadlock or resource unavailability, the system aborts an active transaction.

System Crash

There are problems − external to the system − that may cause the system to stop abruptly and cause the system to crash. For example, interruptions in power supply may cause the failure of underlying hardware or software failure.

Examples may include operating system errors.

Disk Failure

In early days of technology evolution, it was a common problem where hard-disk drives or storage drives used to fail frequently.

Disk failures include formation of bad sectors, unreachability to the disk, disk head crash or any other failure, which destroys all or a part of disk storage.

Storage Structure

We have already described the storage system. In brief, the storage structure can be divided into two categories −

 ·        Volatile storage − As the name suggests, a volatile storage cannot survive system crashes. Volatile storage devices are placed very close to the CPU; normally they are embedded onto the chipset itself. For example, main memory and cache memory are examples of volatile storage. They are fast but can store only a small amount of information.

 ·        Non-volatile storage − These memories are made to survive system crashes. They are huge in data storage capacity, but slower in accessibility. Examples may include hard-disks, magnetic tapes, flash memory, and non-volatile (battery backed up) RAM.

 

Post a Comment

Previous Post Next Post

Contact Form