Slideshow:
|
Result: lost of a data stored in a disk block
|
|
|
Update xL using this algorithm: successL = false; ntries = 0; while ( not successL ) { ntries++; write data to sector xL; read data back; if ( verified OK ) successL = true; else { if ( ntries > too-many-times ) { replace xL with another sector; ntries = 0; // Repeat !!! } } } Update xR using the same procedure above |
Result: only 3 outcomes are possible
|
ntries = 0;
while ( ntries < too-many-tries )
{
/* ============================================
If xL is OK, use xL
============================================ */
read sector xL;
if ( verified OK )
return xL;
else
{
/* ======================================
Otherwise, use xL
====================================== */
read sector xR;
if ( verified OK )
return xR;
}
// Comment: one of xL or xR read operation will be successful !
}
|
|