Ejecting Devices, poorly thought out since the 90s

Thoughts By 6 years ago

Remember in the old days when computers only ran a couple of programs at a time due to their minuscule capabilities and low user requirements? Back then everything was simpler, because it was assumed if you were operating a computer you knew what you were doing, for example if a program was using a file on physical media that could be ejected, and it refused to eject it because it was in use you could pretty much find the culprit due to the low amount of processes you were running.
Well that has changed. Computers are doing more multi-tasking than ever, if you asked me what program a file was currently tied to I would probably not be able to answer that. So what use are error messages like this if they do not give me any information about the process that has locked the file:

Who's in charge exactly?

Who's the baws?

Given that the activity monitor tells me I have 130 processes open, I have no idea what application is using the files on my iPod, but you as the operating system do, so why not just tell me what I need to do to eject safely? Look, I’m going to be honest, I’m ejecting this device as a favour to the operating system so it has time to prepare for this event, I’m not really giving it an option. I’m not saying “if you feel like letting me have my portable device then release it”, I’m saying “release it now, I need this device elsewhere”. If it refuses to release it I simply unplug it, and yes I know this can damage the device but that’s the way it should be in reality, Apple with it’s focus on user interaction should have picked this up by now.

And don’t think I’m just singling Apple out, Windows and Linux both do this absolutely redundant practice in the same manner, and the only way to get around it is to install 3rd party applications which hook into the OS and deliver some information about which process is handling which file, I am not surprised however that Windows and Linux haven’t fixed it, but I really thought Apple would have picked up on this by now (as of OSX Lion).

I suspect this problem is caused by the way C handled files, once a file is opened it seems there is no callback to tell the program the file is no longer available. Having said that, fwrite and fread both offer ways to tell if the operation was successful, if it is unsuccessful a number of times its a fair bet the file is no longer available. I suspect a lot of coders wouldn’t have added this ability in, but never the less operating systems should be moving with the times. It is absolutely ridiculous that this has been going on since the 90’s and not one of the major operating systems has put up its hand to fix the problem given that it happens to everyone, and is anything but a major annoyance and built for a different time.