You need to know about disk write caching – trust me

Take care when removing your external drives. This applies to USB and firewire external drives, to flash cards and to flash drives – otherwise known as pen drives, thumb drives or memory sticks.

sick floppy

If you don't follow the rules, one of these frosty Fridays your supposedly safely backed up data will be toast.

Yeah? Why?

OK, this is mildly complicated. When Windows, or any other operating system, writes stuff onto your storage drives – HDDs, CD-R or flash drives for instance – there's a hurdle to jump.

Your computer can process data at speeds which are orders of magnitude faster than the rate at which it can write data to your disks. If Windows sat around and waited for those data to be written, your fancy new 4GHz processor and would be spinning its quad-core wheels and your computer would slow to a crawl until writing was completed.

"The cheque's in the mail"

Clever techie folk solved this problem a long time ago by introducing "write caching". The principle is quite simple: you disconnect the fast computer from the slow disk writing process. Instead of writing the data directly to disk in real time, the information is sent to temporary storage in a fast memory cache, the cache then reports back to Windows that the data has been written. It's the IT equivalent of "the cheque's in the mail".

You and your computer can get back to playing Space Invaders and writing the great 21st Century novel. Unfortunately however, just like the mythical cheque, the data have quite possibly not arrived at their intended destination. Windows just thinks they have. Under the hood the data are still sitting in the cache waiting for a quiet moment to be written to the target drive.

"OK, So what?" I hear you cry

sick pc

If the postman steps on a landmine, even if the cheque had been in the mail it would be dog tucker. Same with your cached data. If your PC is in the process of writing stuff (which it often does, whether you initiated it or not) and:

then you run a significant risk of data corruption because file writing has not been finalised.

If this happens you will probably trash the data and possibly your external disk or, if it's an operating system file being written to, you can even corrupt your Windows installation.

Oh dear, that's a bit of a worry

Too right it is. But never fear, you can protect yourself.

XP safely remove icon