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

514 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

ELI5 format:

Imagine you have a truck pulled up to a loading dock, and people come by with things to put into it.

Each time you go up to the dock and hand something (you write a file, say) to the person there (the operating system), they have to drop everything, run into the truck, and place your item there.

That’s really slow, right?

So the person just puts those things into a little pile by her side, waiting for enough people to drop enough things off so that she can save time by going to the truck just once to drop off the whole load.

Which is great – now you can have a long line of people drop off little things quickly, and they don’t have to wait after each drop off until the person goes to the truck and returns.

But now imagine – it’s time for the truck to leave with its load. If it just pulls away from the dock, it’ll leave a bunch of things behind. So a bunch of stuff is lost. Worse, someone may have dropped off 10 items together, but on the last loading trip to the truck, you could only take 3 of those things to the truck (because your hands were full). So now, when the truck pulls away, your delivery has been mangled.

So, you want the truck driver (the flash disk) to send a signal to the person (the operating system) saying “I’m about to leave, yo”. And the operating system hustles and writes everything back on to the disk, and then says “It’s OK to leave/unplug now”.

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