On Sat, 22 Jul 2000, you wrote:
> Hi,
> 
> Not realy sure what you mean by CRC when you talk about Western Digital 
> drives.  Can you explain that to me?
> 
> Thanks,
> 


CRC or Cyclic Redundancy Check is a fingerprint of data.  Etienne Galois in the
late 1700s developed the mathematics upon which the technique is based.  Across
a channel which may have errors, the CRC "fingerprint " is unique enough that a
small number of errors on a large block of data will generate a different CRC
every time.  A simple explanation of the pertinent mathematics of Algebraic
coding theory as applied to a primitive monic polynomial in a Galois field of
2^n is here.   (There is a more sophisticated use where a channel is KNOWN to be
noisy, which uses multiplication of ALL the data by the polynomial and division
on the receiving end which can recognize and correct a limited number of
channel errors, sometimes called ECC, though ECC also includes Hamming Matrices
and other techniques of lesser power and lesser demand on resources.)

http://www.acius.com/ACIDOC/CMU/CMU79909.HTM  

OK how does this work on a HDD?

The system sends a stream of data and calculates a CRC and appends it to the
message.  The (proper protocol compliant) HDD receives the data and calculates
a CRC then compares that with the CRC received and complains if the CRC is a
mismatch with the one received.  WD receives and stores the CRC transmitted
without any real check.

Now in the reverse direction, most drives do not again calculate the CRC,
though some do and compare it with the stored CRC at the end of the data block
as a further data integrity check.  Anyway--the system receives the data block
from the disk and the stored CRC, and does its own CRC calculation....

Now here is where the CRC error may arise if the drive does not do its own CRC.
If the data stream sent out had a channel error or more, then the CRC 
calculated from the drive data will not match the stored CRC sent back from the
drive.  Data is corrupt and the system complains, first requesting resend  then
getting the same erroneous data unless by random chance the channel errors
somehow reverse on the transmission back to the computer.  That is the way it
was explained to me.  I am not qualified as an expert in this area, only in the
mathematics of it, not in the trade implementation.

CRC errors _Rarely_ happen.  On those rare occasions when they do, the
receiving agency requests retransmission and all is well on the second try. 
But when one end of the connection simply accepts the other, it may receive and
store data that will later test as no match to the stored CRC.  As one learns
with computers, odds of billions to one against an error don't say it won't
happen but, using the Poisson distribution, you can calculate the probability
of your most likely time of observing the error; so the odds against an error
can tell you _When_ it will happen.

Civileme


Reply via email to