December 16th, 2003

The unsafe device removal dialog

In a comment, somebody asked what the deal was with the unsafe device removal dialog in Windows 2000 and why it’s gone in Windows XP. I wasn’t involved with that dialog, but here’s what I remember: The device was indeed removed unsafely. If it was a USB storage device, for example, there may have been unflushed I/O buffers. If it were a printer, there may have been an active print job. The USB stack doesn’t know for sure (those are concepts at a higher layer that the stack doesn’t know about) – all it knows is that it had an active channel with the device and now the device is gone, so it gets upset and yells at you.

In Windows XP, it still gets upset but it now keeps its mouth shut. You’re now on your honor not to rip out your USB drive before waiting two seconds for all I/O to flush, not to unplug your printer while a job is printing, etc. If you do, then your drive gets corrupted / print job is lost / etc. and you’re on your own.

Topics
History

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.