explainlikeimfive

ELI5: Why does Mac require you to eject a USB drive before removing it, but Windows doesn’t?

Thank you

https://www.reddit.com/r/explainlikeimfive/comments/1lw1z64/eli5_why_does_mac_require_you_to_eject_a_usb/
Reddit

Discussion

APLJaKaT

If you want to prevent file errors then you need to "eject" removable drives in Windows as well. This is the signal to the OS that any cached writes need to be written to the drive so that it can be safely removed.

When you write to a removable drive, the OS may actually make the write, or it may cache the write. That is, it might decide it has more important things to do first and will get around to actually writing the file when it gets a spare moment. Much like a teenager being asked to do something, who knows when it will happen. By ejecting the drive, you are telling the OS okay I need that file written right now. Forget about what you're doing and complete this write immediately.

10 hours ago
AtlanticPortal

Windows started to avoid caching and writes files directly to USB devices. That’s why now there is no need for “safe” ejection. 

10 hours ago
APLJaKaT

I'm pretty sure write cache is still enabled by default but perhaps can be disabled for removable drives.

AI tends to agree (but I'm not sure how much I believe in AI)

"Windows 11 does cache writes for removable drives to improve performance, you can manage this behavior through the device policies. If data loss is a major concern, you can disable write caching or use the "Safely Remove Hardware" process to ensure data integrity. "

10 hours ago
XavierTak

That made me laugh right next to my two teenagers, and I'm still pondering whether I should explain why the sudden outburst.

5 minutes ago
mage1413

Windows has options to disable writing cache on the usb drive. So if you arent actively transferring files you can remove it without ejecting. Older windows didnt have this option.

10 hours ago
Jason_Peterson

Older Windows usually didn't use a writing cache by default and USB disks were very slow. Copying one file would require updating the file system in one or a few sectors and small file would take extremely long time and cause wear to the memory. You still should have stopped drive with the "safely remove hardware" button because it could be that some program was currently writing to the drive.

10 hours ago
Cataleast

They both do. The "ejecting" is basically just telling the operating system to stop reading/writing on the drive to ensure there's no data corruption, etc. If you're absolutely certain there's nothing going on on the device, you can just rip it out without so much as a "Heads up!" to the OS.

10 hours ago
[deleted]

[removed]

10 hours ago
explainlikeimfive-ModTeam

Please read this entire message


Your comment has been removed for the following reason(s):

  • Top level comments (i.e. comments that are direct replies to the main thread) are reserved for explanations to the OP or follow up on topic questions (Rule 3).

If you would like this removal reviewed, please read the detailed rules first. If you believe it was removed erroneously, explain why using this form and we will review your submission.

7 hours ago
mage1413

what?

10 hours ago
tyderian

You can, and should, eject removable devices on Windows too.

10 hours ago
mage1413

If you dont know about "Quick Removal" capabilities then of course always eject. On Windows 11 if you arent actively doing a file transfer you dont have to eject your USB. You can if you want but you dont HAVE to. If you arent sure if there is a file transfer occurring then always eject but has techology has gotten better its become unnecessary, at least for windows

10 hours ago
NotADoorMatNoMoore

Windows suggests to "eject" the drive, right-clicking on it in a Windows explorer and then select the option "eject". In Mac you need to drag the icon to the trash can that becomes the "eject" button. Different processes that you can bypass by just removing the hardware, but that can damage your files in the drive.

10 hours ago
ReallyQuiteConfused

It always makes me weary dragging an entire drive into the trash. Like I get it, I used Macs for 10 years back in the day, but still. Never felt right

10 hours ago
Kajitani-Eizan

Dragging to the trash was always a garbage quirky gimmick, it shouldn't have ever been a thing and should certainly not be a thing now

9 hours ago
etheth44 OP

Good responses, thank you all

5 hours ago
dmw_chef

Writing to a usb drive is slow. Writing to memory is very very fast. When you copy a file to a USB drive, in order to feel more responsive and fast, the operating system can instead of copying directly to the USB (slow) copy it first into memory (very very fast), and tell you the operation is done. Then, when it’s not doing anything else, complete the slow copy to the USB drive. If an operating system uses this trick, you need to tell it you’re going to remove the USB drive so it can finish copying those files in the background. If you remove it before that’s done, the files still in memory but not yet copied to the USB disk will be lost.

I don’t know if windows uses this trick, but I suspect it does and removing a drive without ejecting it can cause you to lose data if you pull it too soon after copying a file.

10 hours ago
esaum0

This is the best answer here and hopefully gets higher

10 hours ago