-1
\$\begingroup\$

In NAND Flash, the whole block is erased.How is the data in that block that is not intended to be erased, gets recovered after it is erased? Is there some kind of Flash Memory Management Unit that helps in recovering or relocating that data?

\$\endgroup\$
  • 1
    \$\begingroup\$ How is that "not secure"? \$\endgroup\$ – duskwuff -inactive- Jul 31 '17 at 3:03
  • \$\begingroup\$ Since you are losing programmed data, after erasing the whole block. \$\endgroup\$ – Shankhadeep Mukerji Jul 31 '17 at 3:14
  • 3
    \$\begingroup\$ Block erase memory 101: if you want to keep part of the data in a block when modifying it, you have to copy that data elsewhere, erase the block, then write the parts to be retained back. Often in practice this is combined with wear leveling, so the modified version gets written elsewhere and the original block is erased and freed for much later re-use with entirely different data. \$\endgroup\$ – Chris Stratton Jul 31 '17 at 3:42
  • 1
    \$\begingroup\$ There are endless write-ups that explain NAND block management such as this: eng.umd.edu/~blj/CS-590.26/micron-tn2919.pdf ...or this... kingston.com/us/community/… \$\endgroup\$ – Jack Creasey Jul 31 '17 at 5:14
  • \$\begingroup\$ @ShankhadeepMukerji Still not sure how that qualifies as "not secure". You can erase or overwrite data on any rewritable storage medium -- does that make anything other than write-once media "insecure"? \$\endgroup\$ – duskwuff -inactive- Jul 31 '17 at 5:36
0
\$\begingroup\$

It is the memory device's software driver who is responsible for managing physical memory where entire blocks of data are erased.

Several types of physical memory over write or erase entire blocks of data. Hard Disk Drives and Flash Memory to name two. Normally, a block of memory is only used for a single file. If a file is larger then one block of memory, several blocks can be used. So if a file is deleted, the block or all the blocks associated with that file are deleted.

It is unusual to share data from several files in a single block of memory. But if this occurs, it would be the responsibility of the storage device's software driver to copy the parts of the block to be preserved to another block before erasing the older block of memory.

If this is an embedded application there may be no storage device software driver. That is, the embedded application manages a block memory device directly. In such a case, the embedded programmer needs to be very careful in how they manage the memory device so as not to erase wanted data.

\$\endgroup\$
  • 1
    \$\begingroup\$ Hard disk drives do not use block erase, you can re-write any sector without first performing an erase. Solid State Drives based on NAND flash do however use block management and have to do block erases at times. Block erases are avoided because they slow the storage throughput rate down. In most Flash management schemes the new data is written to initialized blocks and the old block added to a free list which can be erased in the background. \$\endgroup\$ – Jack Creasey Jul 31 '17 at 5:19
  • \$\begingroup\$ Ok, I reworded the answer to include "over write" as well. \$\endgroup\$ – st2000 Jul 31 '17 at 5:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.