How To Shutdown a Computer

Sometimes I still feel like we’re in 1982 when it comes to really basic things like turning off a computer. Why do we have to select shutdown from a menu? Why do we have to carefully save each open file? Why don’t programs stop when we tell them to? (Time Machine has now been spinning for hours, and won’t stop even though I’ve told it to.) Why is this so much more complex than it needs to be?

In the future, here’s how shutdown should work:

  1. You flip the power switch.

That’s it. No shutdown menu item. No wait for the system to hibernate. No opportunity for applications to save data. Nothing.

Then, when you turn the power switch back on, the entire system is restored with all data, windows, and programs intact (optionally after typing in the usual username/password credentials.)

In 2009 there is no excuse for an application to lose data because it hasn’t been recently and explicitly told to save. Nor is there any excuse for an application to block the system from shutting down. When I turn my computer off, it should go off, and when I tell an application to quit it should quit. More to the point, the operating system should forcibly terminate that application. I am thoroughly sick of applications that think File/Quit (File/Exit for Windows users) is a suggestion. It’s not. It’s a command, and one they should immediately respond to.

Few applications today get this right: not on the Mac, not on Windows, not on the Web. (Web apps such as WordPress do actually get a little closer to this, but many still launch popups telling you you may lose data if you close a window. There should be no such popups because they shouldn’t lose data, ever.) Firefox helpfully offers to restore all the open windows when the applications is relaunched, including after a force quit. More applications should do this. However even Firefox occasionally gets wedged and refuses to quit when told to.

There are actually a few steps to reaching this simplified nirvana, so maybe I’m asking for more than one thing here. Most laptops and applications can handle a system going to sleep. We just need to make sleeping a little faster (or at least less intrusive to the user) and possibly hook that up to the power switch in the hardware.

However, when waking from sleep, the operating system restores each application to the state it was in previously. We also need to make sure that applications are ready to be terminated with extreme prejudice in circumstances where the operating system will not restore their stack and heap. In such circumstances a character or two of data loss may be acceptable, but no more. Applications should save constantly to persistent storage without waiting for the user to tell them to do so. Furthermore, when writing complicated data structures they should maintain integrity even when they’re interrupted in media res. The techniques to do this are not complicated are hard to understand. They have been implemented by server software like Oracle for years now. We just need to demand the same sort of reliability from our desktop software.

A little more bleeding edge (but only because no one has bothered to do this yet) applications should maintain data integrity even in the face of flaky and unreliable hardware. Filesystems should not be tied to any particular physical drive. (No, RAID helps but doesn’t quite achieve this. RAID controller failures still cause data loss.) Better operating system support and more abstract filesystems that aren’t tied to particular disks would help here. However in the absence of this, applications could still store their data across multiple file systems, and they should do this without asking the user where to save or how to configure the disks. (Whether a traditional hierarchical file system is still the right metaphor for storage is a subject for another article.)

We take too many things for granted merely because that’s the way they’ve always been. But what made sense in an era of 64K floppy disks that could write a hundred bytes a second no longer makes sense in an era of terabyte hard drives that write a hundred megabytes a second. It is time to make saving files as obsolete as remembering to fill your fountain pen.

51 Responses to “How To Shutdown a Computer”

  1. whatsapp group links Says:

    Good post. I learn something totally new and challenging on websites
    I stumbleupon on a daily basis. It’s always helpful to read through
    content from other authors and use something from other web sites.

Leave a Reply