Parity Memory

DRAM memory can include a mechanism used to verify and maintain the integrity of the data it holds. The two methods used most often are parity and error-correcting code (ECC). Parity and ECC memories are more expensive than non-party memory, and as a result, non-party memory is much more common. Non-party memory is what most people think of as regular memory. Parity and ECC memories are less common and are the exception.

Even and Odd Parity

 Parity has been around about as long as PCs themselves. Of course, there is really no way for a bit to know exactly what should be stored in it individually or in any part of its memory, for that matter. But, there must be some way to helpprevent and detect bit errors in data being moved about as fast as memory does. To do so, parity systems add an additional bit to every eight bits of data—in other words, every byte gets an extra bit. The extra bit is used by the system to verify that the right amount of bits with the value one was sent, received, and stored.

There are two types of parity protocols: odd parity and even parity. Odd parity checks that the number of 1 bits (bits with the value of 1 stored in them) in a byte is an odd number. Even parity performs the same check on an even number of 1 bits. The parity bit is toggled on or off to make sure the number of 1 bits remains even or odd as required. Parity is achieved when the number of 1 bits in a byte plus the parity bit adds up to an odd number or even number, depending on the protocol in use. Table 7-6 shows the impact of the parity bit on the data width of SIMM and DIMM modules.

When a byte (and its parity bit) does not have the right number of bits, either even or odd, the result is a parity error. On most systems, a parity error is enough to halt the system with a blue screen of death. Memory parity errors can be an indication of a one-time memory fault or a seriously faulty memory module. Repeated parity errors are a fairly good indicator that your PC has a bad memory module. One of the shortcomings of parity checking systems is that they only detect errors and not large ones, at that. Since they only check for errors in even- or odd-bit counts, parity systems cannot specifically identify where a parity error has occurred. All it knows is that

an error was detected, but that is not all bad. If a byte starts out with six 1 bits but ends up with only five or gains one and has seven, there is definitely a condition in memory of which you should be aware. Parity memory systems are able to detect only a 1-bit error and cannot fix the error. When a parity error is detected, normally an error message is displayed to the monitor and the system halts.

ECC Memory

Error-correcting code (ECC) goes beyond simple parity systems to detect errors of up to four bits and correct all 1-bit errors in memory. Four-bit errors in memory are extremely rare and when detected are an indication of a serious memory problem. However, 1-bit errors are quite common and ECC memory is able to correct them without reporting errors and keep the system running. Errors detected of two, three, or four bits are reported as parity errors and the system halts.