Hacker News new | ask | show | jobs
by Dylan16807 2 days ago
You're going to get some cell errors even at 1 bit per cell. Creating perfect storage without ECC isn't worth the difficulty and extra space.
1 comments

True, but in a 1-bit-per-cell flash memory cell bit flips are much more difficult than in a DRAM cell, where again bit flips are much more difficult than in an SRAM cell, which is the most sensitive to radiation and electric noise.

ECC is needed even in 1-bit-per-cell flash memories, but mainly because they have a great number of bits. At an equal number of bits, the need for ECC would be less strong in flash memory than in DRAM, where the need of ECC is less strong than in SRAM.

In general, it is difficult in a read/write memory device to improve simultaneously its speed and its ability for information retention. So the faster a read/write memory is, usually it also has greater chances to lose the information stored in it.

DRAM is much more durable than SRAM? I only ever hear about sticks of memory going bad and weaknesses like rowhammer, while something like L2 cache seems to work forever if it passed initial testing. And I never hear mention of SRAM ECC outside of radiation-hardening, while every server gets DRAM ECC and it's been an issue for a long time that desktops don't.

And I'm not very convinced of NAND having slower data loss than either of those on a per-bit basis, despite it being orders of magnitude slower to read and write.

All the caches in CPUs, even in "consumer" CPUs, use ECC for correcting the errors.

Only the instruction caches use only parity for error detection, because they do not need to correct the errors. When an error is detected, the cache line is invalidated and it will be reloaded in the future, if needed again. (The same would be true for write-through caches, but nowadays very few, if any, CPUs still have such caches.)

A notorious case of CPUs that had not used error correction in their cache memories was a series of CPUs made by Sun, I think by the end of the nineties, which caused a lot of grievance to the Sun customers, until the cause of their erratic behavior was determined.

You do not hear about ECC in SRAM, because nowadays very little is heard about the internals of CPUs, unlike in the past when all CPU designers provided a lot of technical details about their CPUs, including schematics of the more interesting parts, e.g. schematics of flip-flops, bragging about the more clever technical solutions used in their new CPU.