Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wouldn't call it an optimization. Generally, the fastest way to logically delete data is to just forget that it's there. RAM works the same way, as would any other medium that doesn't have any special requirements for writing.

Flash is the unusual case since it needs to be "flashed" in bulk before it can be rewritten.



> Generally, the fastest way to logically delete data is to just forget that it's there. RAM works the same way, as would any other medium that doesn't have any special requirements for writing.

Many media have special requirements for writing. It's true that DRAM and SRAM don't have a separate "erased" state, and neither do fuse PROM, core memory, Williams tubes, acoustic delay lines, or magnetic disk and tape.

But CD-R, Flash, CD-RW, rewritable magneto-optical disks, two-photon storage, and some other memory types have a distinct "erased" state; in some cases, you can't even return to that state. I'm not sure about MRAM, FeRAM, PRAM, and hypothetical memristive memories.


The reason for erasing data is generally to free up space so new data can be written.

Whether this erase procedure happens immediately upon the user's request to delete the information or whether it's added to a queue of areas to erase (the "purging routines" or "garbage collection" mentioned in the article) is a small detail. A modern OS will return control to the user immediately upon issuing the command, and all that matters to the end user is that the erase command is issued before the next write. A firmware

I seriously hope that these researchers aren't advocating a mandate that states that the erase procedure cannot be issued until a write is requested to that space.


I think that's just an argument about semantics. You say "fastest". If you ignore that and just do it the dumb way, then you're deleting data by overwriting it. Making it "fastest" is the optimisation.

In any case, I still think your point is valid despite disagreeing with you, and I think it's disappointing that you just received a downmod. I've just upvoted you back to 1.


In NOR Flash, if you overwrite data, the result is the AND (or the OR) of the old data and the new data; that is, you can write 0 bits, but not 1 bits. Erasing is a separate and much, much slower process, which is why it's done a sector at a time instead of a bit at a time.

In NAND flash, overwriting isn't even an option, although I don't understand why.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: