System crash can be defined as unexpected halt or sudden malfunction of a system and its components. Factors could be external or internal critical errors or obstruction to the system that causes the system to stop unexpectedly.
What
is Disk Failure?
Disk Failure is when a critical error causes a disk to malfunction or stop working. Errors or failures include bad
sectors, unreachability to the disk, disk head crash or any other failure,
which destroys all or a part of disk storage.
What
is Recovery and Atomicity?
Recovery is the systematic process and procedures of files retrieval after a system or disk has crashed.
When
a DBMS recovers from a crash, it should maintain the following:
1. It should check the states of all
the transactions, which were being executed.
2. A transaction may be in the middle
of some operation; the DBMS must make sure the atomicity of the transaction in
this case.
3. It should check whether the
transaction can be accomplished now or it needs to be rolled back.
4. No transactions would be allowed to
leave the DBMS in an inconsistent state.
There are two types of techniques,
which can help a DBMS in recovering as well as maintaining the atomicity of a
transaction:
1. Maintaining the logs of each
transaction, and writing them onto some stable storage before actually
modifying the database.
2. Maintaining shadow paging, where the
changes are done on a volatile memory, and later, the actual database is
updated.
What
is Log-based Recovery?
Log is an order of records, which
preserves the records of actions executed by a transaction. It is important
that the logs are written prior to the actual modification and stored on a
stable storage media, which is failsafe.
Reference: Tutorials Point | Wikipedia
No comments:
Post a comment