this post was submitted on 04 Aug 2023
181 points (97.9% liked)

Explain Like I'm Five

14243 readers
31 users here now

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.

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] mindbleach@lemmy.world 5 points 1 year ago

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.