Monday, May 8, 2017

ssd - Can flash memory be physically damaged if power is interrupted while writing?


If data is actively being written to a flash memory device, can a memory cell (or perhaps the entire memory device) be physically damaged if power is removed, or will data simply be corrupted? Can the affected device or memory block still be written to and read from (even if the data itself is corrupted)?


This question has been on my mind since I've encountered memory cards for video game consoles where the manufacturer claims such damage would occur in the event the power is turned off while saving, and it still bothers me with regard to USB flash drives and SSDs.


Answer



Here is a paper about errors caused by power failure on flash memory: http://cseweb.ucsd.edu/users/swanson/papers/DAC2011PowerCut.pdf


I cite the last sentence of the abstract:



Finally, we show that incomplete erase
operations make future program
operations to the same block
unreliable.



and the conclusion of the paper:



The flash memory devices we studied in
this work demonstrated unexpected
behavior when power failure occurs.
The error rates do not always decrease
as the operation proceeds, and power
failure can corrupt the data from
operations that completed
successfully. We also found that
relying on blocks that have been
programmed or erased during a power
failure is unreliable, even if the
data appears to be intact.



My personal conclusion is



  • Power loss in general can render flash memory in an unreliable state. However, once you hard erase, the memory works as good as before.


  • Carefully written firmware can fully prevent errors on power loss but at a performance and lifetime cost of the flash memory as writes have to be protected by extra writes.


  • Many vendors offer hard erase utilities for download. But I think there are flash memory devices that do not allow you to do a hard erase and also will not perform a hard erase themselves and also do not employ a perfectly safe write protocol. It follows that these can be rendered effectively unreliable or unusable by power loss during a write even if they are not damaged physically.


  • If you really want, you can take an "effectively unreliable or unusable" USB memory and move (i.e. desolder and reconnect) its flash ICs to an environment that allows hard erasure. The flash ICs should be useable again now.



No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...