Stable storage means a storage of the data that are stable.
It is essential for some computer applications that data never be lost/corrupted even in the face of disk and central processing unit (CPU) errors.
Basically a disk should works all the time without any errors. But unfortunately it is not achievable.
Here, achievable is that a disk subsystem that has this property; when a write is issued to the disk, then the disk is either correctly writes the data or it does nothing, leaving the existing data intact. Technically, this type of system is also called as stable storage.
Basically stable storage uses a pair of identical disks with corresponding blocks working together to form a error-free block.
The corresponding blocks on both the drives are same in absense of errors. Either one can read to get same result.
The three operations which are described in the table given below are defined to achieve the goal.
|Stable writes||It consists of first writing the block on the drive 1 and then reading it back just to verify that whether or not it was written correctly. If not, then the write and re-read are done again up to n times until they work.|
|Stable reads||It first reads the block from the drive 1. Now in case, if this yields an incorrect ECC, then the read is tried again up to n times. And in case if all give bad ECCs, then the corresponding block is read from the drive 2. A successful stable write leaves two good copies of block behind and the probability of same block spontaneously going bad on both the drives in a reasonable time interval is negligible. Therefore, a stable read always succeeds.|
|Crash recovery||Whenever a crash occurs, then a recovery program/code scans both the disks comparing corresponding blocks. Now, if blocks pair, both good and same, then nothing is done. And when one of that block pair has an ECC error, then the bad block is overwritten with the corresponding good block.|
© Copyright 2021. All Rights Reserved.