In a similar vein, why can we not use the technology of RAM to prolong the life-cycle of an SSD?

41 points
*

so people have said that it’s to do with volatile (it forgets) and persistent/non-volatile (it remembers), but i think the crux of your question is a little more nuanced: WHY does the mechanism to “remember” a 1 or a 0 get damaged with SSDs and not for RAM

now, i’m not expert here but i think i have a basic understanding and i’ve pieced some bits od research together!

(edit: it should be noted that what ive described here as simply “RAM” is actually SRAM, but modern computers mostly use DRAM which is different: it uses a capacitor instead of a couple of transistors, but the fundamental idea is the same)

RAM is very simple: for the most part, it’s just a few transistors - they’re basically little switches that work just with electrical current… they can be arranged so that transistors connect to another transistor, so that they’re both telling each other to be “on” (this is SUPER simplified, but kinda think of the electricity being stuck in a loop: it just goes round and round between the transistors, and that’s “on” or 1)… transistors are very reliable! their chemistry doesn’t degrade over time (note though that because electricity doesn’t actually go around in an infinite loop, if the “loop” stops getting power to replenish it, it resets to 0, which is what makes it volatile!)

SSDs though store their 1s and 0s more in chemicals… think of your SSD like a bunch of little boxes with water in them, and you read the 1s and 0s based on how clear the water is… you add sand to make a 1, and you filter out the sand to reset it to a 0! the more often you do that though, the dirtier the water gets until you can’t tell if it’s just dirty water of if it has sand in it (actually you add electrons to the gates in an SSD which changes the cells resistance and you read based on that, but at some point the electrons just keep ”sticking” in the cell so the resistance doesn’t change as much as we’d like)

permalink
report
reply
5 points

SSDs typically use flash memory, as I understand it. I’d leave the sand out and say it’s like a tank you fill up with (more or less depending on the data) water. After a while the tank mechanically wears out and starts to leak. Flash memory very much is like a tank filled with electricity and then plugged, and it does start to leak as the insulating oxides degrade.

permalink
report
parent
reply
3 points

oh I get it. since transistors can’t hold charge when machine is off data in RAM go away. and since SSDs store data chemically power status doesn’t affect the storage. nice

permalink
report
parent
reply
15 points

RAM storage cells are tiny, fast, and don’t degrade over time. Each cell can store an electrical charge that distinguishes a 0 from a 1. However they forget their contents whenever they’re being read or if they’re not topped up occasionally. RAM needs to be refreshed by writing back contents after a cell is read, and making sure that periodically every cell in the chip is read and written back. Without constant power to refresh, RAM forgets its contents.

Flash is similar to RAM because it also stores data as a charge. To make the contents last without power and survive being read, each cell is tied to the gate of a MOSFET transistor. The MOSFET is like an amplifier in that it takes the small charge at the input and controls a larger signal without depleting the input charge. Think of the cell as a light switch: the switch stays in the same position no matter how much electricity passes through. The part that stores the charge and makes the flash MOSFET different from a normal MOSFET used in other electronics is called the floating gate. This is made of layers just a few atoms thick of insulators and conductors.

The catch is in programming and erasing the cell. To make the flash cells last, you need to eliminate any possible conductive path in or out of the charge storing part of the cell. Programming a flash cell to a 0 (flash is a “1” in it’s erased state, the N in NOR and NAND flash stands for “not”, i.e. negative logic) requires pushing a high voltage onto the MOSFET, causing it to conduct just enough to push some electrons into the MOSFET’s floating gate. Erasing requires an even higher voltage applied in a different way to drain the charge out. Both processes take advantage of normally undesirable features of MOSFETs called breakdown, where a high enough voltage causes it to conduct in ways it wouldn’t in normal operation.

Those high voltages, particularly the erase voltage, cause permanent wear on the floating gate and MOSFET, causing the charge to leak faster than normal. Even flash that’s not written or erased often isn’t perfect and a programmed cell will degrade over many years from a 0 to a 1. There is a whole science to counteracting flash wear and inevitable errors that I won’t go into here. The SSD controller chip is responsible for managing wear and data integrity, which is why you sometimes hear about SSDs that could lose your data if you don’t have a bugfixed firmware.

There are other technologies that are available that could replace flash. MRAM stores magnetically and is immune to wear from writing, not unlike core memory used in computers from the '50s through the '70s. FeRAM is similar to MRAM but less dense. You already have FeRAM in your car’s dash to store the constantly updating mileage, as it’s immune from damage by that constantly updating number or automotive temperature extremes. Phase change memory stores by heating tiny chunks of a crystalline material to get it to change it’s structure. Intel used this in its now-defunct 3D Xpoint memory. Memristor is another that takes advantage of a relatively new kind of electronic component type.

All of these new technologies are better than flash in longevity and many are close to RAM in performance. However none yet can be made as dense as RAM or as cheaply as flash. Memristor and MRAM are both frontrunners for replacing both RAM and flash, but it’s only fairly recently that fabs started offering the processing steps needed to make these in high density devices.

permalink
report
reply
5 points

Dynamic RAM is a bucket with a hole in it. Genuinely, that is the model that makes it so cheap.

Static RAM is the proper way to do memory: half a dozen transistors form each bistable flip-flop, so there’s two input wires and one output wire, and the output wire is either high or low depending on which input wire was used most recently. Static RAM will maintain its state using comically low power. Static RAM runs on the idea of electricity. It’s how cartridge games from the 90s had save files. There’s a button-cell battery that was enough to power some kilobits of memory for an entire decade. But because static RAM uses so many gates, it takes up a lot of silicon, and it is hideously expensive, to this day.

Dynamic RAM is a stupid engineering workaround that happens to be really, really effective. Each bit is a capacitor. That’s all. It will slowly drain, which is why your laptop has to hibernate to disk instead of lasting forever like Pokemon Red. When a capacitor has charge, applying more power is met with resistance, which lets the sole input wire detect the state of that bit. And so long as you check every couple milliseconds, and refill capacitors that are partially charged… the state of memory is maintained. On very old machines this might have been done by the machine. IIRC, on SNES, there’s a detectable stall in the middle of each scanline, where some ASIC reads and then writes a portion of system memory. On modern devices that’s all handled inside the memory die itself. The stall is still there, but if it affects your program, you are doing something silly.

The RAM in your machine has nigh-unlimited write cycles because it will naturally return to zero. It is impermanent on the scale of microseconds. By design, your data has no lasting impact. That is central to its mechanism.

permalink
report
reply
3 points
*

The reason SSDs have limited rewrites is because there’s a physical membrane that electrons tunnel through to store bits. This membrane will break down over time as writes are made.

For a more visual representation: Imagine you have a bowl covered with plastic wrap that’s upside-down, and you push some BBs through the saran wrap from underneath. At first the BBs will stay in the bowl pretty well, but the more holes you poke in the plastic wrap the more likely they are to fall out. Eventually there’s so many holes it can’t hold anything.

permalink
report
reply
9 points

They both use entirely different technologies to store data. RAM is basically just a transistor and a capacitor used to store each bit. This makes it extremely fast to access but it requires a constant supply of power or that capacitor will just discharge. There really isn’t that much that can wear out using a capacitor and transistor so they have long lifespans.

SSDs use NAND flash. Basically they trap some electrons in an insulated section (the gate of a floating gate MOSFET) and to read that they measure the electric field caused by those electrons. This wears out because sometimes electrons may unintentionally quantum tunnel into the insulated section and become permanently trapped there. And once enough electrons have become permanently trapped there, you can no longer distinguish between different values.

You can’t use RAM technology in SSDs because it’s volatile - when power is removed all data gets wiped. It’s also much less dense than NAND flash. 1TB SSDs are pretty easy to find but when was the last time you saw a 1TB RAM stick at a reasonable price?

permalink
report
reply
1 point

Do SD cards and usb sticks also use NAND?

permalink
report
parent
reply
2 points

Any solid-state media you can access is almost certainly NAND. There’s a second kind of flash memory called NOR, but it’s gradually disappearing. I think it’s relegated to EEPROMs and similar embedded uses. The number of applications where its advantages matter are outweighed by the seventeen bajillion dollar market for higher-capacity NAND. All the research money and foundry tech are going toward the one that’ll let them sell 1 TB SSDs for $20.

permalink
report
parent
reply
2 points

Yes but usually cheaper/lower quality.

permalink
report
parent
reply

Explain Like I'm Five

!explainlikeimfive@lemmy.world

Create post

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators’ instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

Community stats

  • 1.4K

    Monthly active users

  • 80

    Posts

  • 1.5K

    Comments