Parity and Error Correction

Описание к видео Parity and Error Correction

In this video from ITFreeTraining, I will be looking at parity and error-correcting RAM. Parity RAM can detect corruption in RAM while error-correcting RAM can detect and correct some errors. I will be looking at both these RAM types, the advantages of each and their disadvantages.

Download the PDF handout: http://itfreetraining.com/handouts/ap...

Effects of RAM Errors
0:19 Before looking at how error detection and correction works, I will first look at what happens when there is corruption in memory. Memory corruption generally occurs as either random errors which have little to no effect or stop errors, otherwise known as blue screen of death. Let’s have a look at these in more detail.

Random Errors
0:39 A random error may not even be noticeable or may appear as a random glitch. For example, some data on the computer may change, however that data is never used. For example, the data is part of some code that the computer never calls. When this occurs, you will not even know a problem has occurred.

In some cases, you may have a more noticeable glitch. For example, in this video the playback distorts and changes color. A small change in data would generally not have such a big effect, but we exaggerated the effect so you could see it better. In some cases, a small change in data could cause a program to crash or return an error.

Stop Error
1:18 In some cases, the computer may not be able to recover from the data change and a stop error will occur. For example, data changes in some critical piece of code may cause a stop error. These can be hard to determine if it was a memory error, because the error given can be completely random. Thus, I consider a stop error once or twice a year or so to be normal; if they happen more often, I would start looking into what is causing it. The next question is how often do these memory errors occur?

How Reliable is RAM?
1:49 It is difficult to obtain a figure since there are so many different RAM manufacturers and different conditions that affect how reliable RAM is. One study quotes a figure that 8% of memory modules are affected by errors each year.

Even with a figure as low as that, if you start adding additional memory modules, for example if you are running a small size data center, you are going to have at least a few memory errors a year. If you are running critical applications like banking operations, this can have a big impact. For example, a single bit changed in RAM can change a person’s bank account from being positive to a negative value. In business, this would not be acceptable and, thus, a number of systems are put in place to prevent this from occurring. In this video, I will look at how parity and error correction memory fixes these problems.

Parity RAM
2:43 Parity RAM works by adding an extra bit for every byte of data. The parity bit is the sum of all the bits in the byte. If there is an even number of “on” bits in the byte, the parity bit is zero. If there is an odd number of “on” bits in the byte, the parity bit is one.

Let’s consider an example. In this example there are four one bits which is an even number of bits. This makes the parity bit zero. If I now consider a second example, and here the number of one bits is three. This is an odd number of bits and thus makes the parity bit one.

Thus, the parity bit is easy to work out, one just needs to count the number of one bits. Next, I will have a look at how the parity bit is used to detect errors.

Error Detection
3:32 When the computer accesses a byte in memory the parity bit is checked. If the sum of bits does not equal the parity bit, the computer knows the memory has changed and thus is invalid. If I consider the following example, where the first bit has changed from a zero to a one. Now when the parity bit is checked, the computer will know the data has become corrupt.

Parity RAM has its limitations, so will not detect all errors. If I consider a second example, and in this example, the first two bits have changed from zeros to ones. When the one bits are added up, the parity bit is still correct. Thus, the change in data is not detected. Parity RAM is thus limited in that it will not detect all errors.

Description too long for youtube. Please see the following link for the rest of the description http://itfreetraining.com/ap/3a20

References
“RAM parity” https://en.wikipedia.org/wiki/RAM_parity
“ECC memory” https://en.wikipedia.org/wiki/ECC_memory
“DRAM Errors in the Wild: A Large-Scale Field Study” http://www.cs.toronto.edu/~bianca/pap...

Credits
Trainer: Austin Mason http://ITFreeTraining.com
Voice Talent: HP Lewis http://hplewis.com
Quality Assurance: Brett Batson http://www.pbb-proofreading.uk

Комментарии

Информация по комментариям в разработке