Re: Formatting the memory card



bjw@xxxxxxxxxxxxxxxxx wrote:
Paul J Gans wrote:

But the real reason is the following. A flash memory card
has only a certain number of read/write cycles that can
be performed on it. The number is fairly large so what I'm
going to say makes little difference.

A flash card can be read with no problems, but to erase it
takes more time and power. The manufacturers fix it so that
an entire block (perhaps 256 bytes or more) is erased at once
since erasing a file byte by byte is very slow.

So for each file you delete manually, the card suffers several
erase cycles in the parts of the card that were used.

In most file systems, when you delete a file, you don't actually
overwrite the blocks of the disk or card that contain the file data.
The OS just changes or removes the file's directory entry so
that it is no longer visible. The data still sits there until those
blocks are overwritten by some new file. This is how various
"undelete" utilities are able to recover files.

This is true of the FAT16 and FAT32 filesystems that are usually
used for memory cards. When you delete a file, the OS changes
the directory entry for that file to have a special character in the
name. It doesn't overwrite the data. Assuming that flash memory
works the same way (I think it would have to, as the OS doesn't
know whether it's writing to a flash card or a removable disk, etc)
deleting a file costs hardly any erase cycles.

That's not how flash memory works. One can't write 0's to
a flash card. [This depends on the actual circuitry. In
some one can write a 0 but not a 1]. To be able to write
one needs to reset an entire block to all zeros. Then one
can write 1's where needed.

You are right that the OS does not know what type of memory
is in use. But the card knows. It contains the circuitry
needed to read and write the flash memory.

The lifetime of a flash card in read/write cycles is generally much
longer than its time-to-obsolesence anyway, given the current trends
in flash card prices.

This is true. Which is why I noted that it wasn't too
important.

---- Paul J. Gans
.



Relevant Pages

  • Re: Installing Coherent on CompactFlash card
    ... A 256MB card leaves plenty ... about 10000 write cycles per sector, for SLC (as in my Kingston Elite ... According to Kingston, Toshiba has calculated ... as a backup or as distribution media Flash card is perfect(at ...
    (comp.os.coherent)
  • Re: Can I boot from Compact Flash via Cardbus in a Latitude D610 ?
    ... Typical CF cards, using flash memory, allow for more than 1,000,000 write ... a clean install, and I have a CF card in the cardbus slot, XP thinks the ... card is the C: drive and wants to install there by default. ... Flash devices have a limited number of write cycles, ...
    (alt.sys.pc-clone.dell)
  • Camera flash cards and Safely Remove Hardware
    ... each slot shows up as a removable drive letter. ... memory card, the card's 'drive label' shows up in 'My Computer', just as it ... Prior to removing the flash card, ... 'Safely Remove Hardware' window to open which displays one USB Mass Storage ...
    (microsoft.public.windowsxp.general)
  • Re: Shiny new portable recorder.
    ... > Floppy disks, like audio tapes, rely on flimsy magnetic material that is ... loss of the recording (unless you drop it on the flash card). ...
    (rec.audio.pro)
  • Re: Moving from tiny ATA Flash to little larger CompactFlash
    ... Now -- if you can mount the card in some way which inhibits the ... something with fewer write cycles to swap in at need. ... an issue with CF than with Flash ATA cards (or other forms of flash memory, ... Single-Level Cell NAND, the type usually used in the faster CF ...
    (comp.unix.bsd.openbsd.misc)