Re: Deleting files on Compact Flash Cards




"Spanky deMonkey" <Spanky@xxxxxxxxxxxx> wrote in message
news:%23nM6bvVAIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
I am running XP SP2 with all the MS updates. I have an internal card
reader USB 2.0 enhanced, and when I insert my 8GB card into the reader, I
can copy files to the HDD pretty quick.

When it's time to delete off the card, it takes forever. For instance I
deleted 127 files (JPEG) and it took 66 seconds. I tried to delete 394
(JPEG) files about 1.5GB and it took 4 minutes, 29 seconds.

Why so long? I thought when files are deleted, the FAT table is erased
and the files left alone.


Whilst you are correct in your assumption, you have overlooked the way FLASH
memory actually works. As you are probably aware: every time you delete a
file, the file directory is updated to show that the file is now deleted and
the FAT tables (there are 2 - one is a duplicate of the other) are updated
to show that the sectors are now free (FLASH doesn't really use sectors as
such, but that is how the FAT filing system works - but FLASH memory is
organised into blocks).

The problem arises because it is not possible to alter one or two bits in
any block on FLASH memory. The only way that can be achieved is to read
the block into a buffer; alter the bits in the buffer; erase the whole block
and then write the buffer back to the block. In practice because the memory
has limited rewrite capability, the buffer is actually written to the least
recently used block (or the next unused block if the memory is fairly new).
The memory houskeeping controller keeps track of what is written where.
This whole process is handled entirely by the housekeeping circuitry on the
memory chips themselves and is entirely transparently to the Windows
operating system. This process occurs for each file that is deleted. The
FLASH controller was not equipped with a crystal ball and has no means of
knowing that the operating system is about to delete another file.

It should be noted that the architecture of FLASH memory cards from
different sources varies and this can affect how the operating system
interacts with it. The times you describe for deleting files from an 8Gb
memory card do not seem to be excessively long.

If you wish to erase the card completely, it is much quicker to format it.



.



Relevant Pages

  • Re: What does double buffer do for a modern SCSI drive?
    ... is only needed by ISA bus mastering controllers. ... card using BM, can only transfer data into this memory area. ... 'intermediate' buffer in this lower memory area is used. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: Canon EOS 30D Question
    ... continously at low res but at high speed without filling up the ... memory card, the better for the 30D buffer memory. ...
    (alt.photography)
  • Re: Camera Storage
    ... But I have a question about memory types. ... It is my understanding that flash memory degrades over time with the ... 300,000-3,000,000 for the card as a whole. ... she's not likely to wear out a CF card, and she'll wear out the camera ...
    (rec.photo.digital.slr-systems)
  • Re: CHDK & Canon SD1000
    ... The program for CHDK preloads from the memory on the card and is not a ... resident flash memory. ... just avoid loading that program card into your camera. ... Cameras...they don't have flash memory to mess around ...
    (rec.photo.digital)
  • Re: need advice on booting linux from compact-flash
    ... of flash memory. ... To continually read the kernel say from flash memory would make the ... all will make use of ram as well as the ... directly to the filesystem of the CF card, ...
    (comp.os.linux.misc)