why is there a “safe to eject” option for USB sticks?

536 views

After you’ve transfered all your data on/off, why cant you simply take out the stick? where’s the harm?

In: 252

30 Answers

Anonymous 0 Comments

You can but most of the time you’ll end up loosing files.

The data transmission between Windows and an USB storage device has intermediaries.

I’m going to simplify it so it gets like this:

Your computer drive ( any kind, like SSD, HDD and so ) has a dedicated zone to buffer data. It is called *cache .* That zone is faster than the rest of the disk. Its purpose is to store data in advance for faster access later. The amount of data it can store is small. Let’s say for this example that it is 1 GB but it really varies a lot and it is tied to several factors.

So you want to transfer a vide from your computer drive to an USB drive. The video is 15GB. So you drag and drop the file from your “Video” folder to the USB. Windows informs the transfer to the HDD and it starts moving the file to its *cache* memory until its filled. Then starts moving the video file from the cache to the USB.

The ” transfer dialog” or progress of transfer will kick in immediately after you drop the file onto the USB. But the file actually will move to cache first making you believe it is already being stored on the USB drive.

So when Windows has passed the last piece of data to the disk cache, the transfer progress will stop showing. And because the disk cache is 1 GB, there is still 1GB left until the full video is on the USB drive. So if you just unplug the USB device immediately after the transfer progress dialog has disappeared , you’ll be preventing the transfer operation to complete.

Once the disk has finished transfer the file it will inform to Windows that the transfer operation is done. Then, if you have pressed the “safe eject” button, Windows will inform you that it is safe to extract the drive.

A couple of points:

* This happens because disk drives have their on *controllers* to handle data transfer. Nobody knows better how to transfer files than disk manufacturers so Windows let the device do its job.
* A disk can not be entirely cache ( in case you wonder ) because it is expensive. SSDs are some sort of cache like disks. They act very like RAM memory. That’s why they are faster
* Surely there is room form improvement on how and when Windows communicates with the disk so Windows can actually inform you better. Usually, transfers happen so fast that this is overlooked but there *are* some controllers that communicates with Windows drivers really well so the transfer progress dialog is actually accurate.

You are viewing 1 out of 30 answers, click here to view all answers.