èƵ

No need to shut down, just pull the plug…

Computers that are built to crash may prove to be more robust

SOFTWARE would be more reliable if it were designed to crash rather than to be shut down cleanly. That’s the conclusion of researchers pioneering a radical approach to software design, who are testing their ideas on software that runs internet web servers.

The apparently simple act of switching off a computer triggers a complex sequence of events. While a computer is running, and users are making changes to files, many operating systems, such as Linux, keep those changes in memory. Before the computer shuts down, these files must be stored on disc to prevent the information being lost, so the operating system includes shutdown routines to make sure all these loose ends are properly tied up. But this can take time, leading to a long delay before the computer switches itself off.

If the system crashes, none of this happens. So to make sure the changes are not lost, most systems have another set of software that leaps into action when the machine is switched on after a crash, checking the files and fixing any inconsistencies it finds.

Armando Fox, who heads the software infrastructure group at Stanford University in Palo Alto, California, noted that, in effect, the shutdown and recovery routines duplicate each other’s tasks. “Why put in the code for both a clean shutdown and a clean recovery?” he asks.

Fox reasons that software can never be made completely free of bugs, and so must always include recovery routines to repair the damage when they strike. But maybe the shutdown routines can go. Preliminary tests on Windows XP and RedHat Linux prove the point that shutdown routines waste time (see Chart). “It is actually faster to crash them and let them recover,” Fox says.

No need to shut down, just pull the plug...

Now Fox and his student George Candea are designing systems that dispense with shutdown routines altogether. To turn these systems off you simply pull the plug, leaving the recovery software to get things going again when they are switched on.

This approach is allowing them to radically alter the way software is managed. For example, many commercial internet web servers have fault detection mechanisms that look for early signs of malfunction, and shut down the software safely. But these safe restarts are time consuming, so the fault detection software only reacts to the most obvious problems that threaten important data. In less critical circumstances, the system just waits to see what happens, which can also lead to crashes or loss of data.

Fox’s approach allows fault detection software to kick in much sooner. “If it’s OK to have [unnecessary crashes] sometimes, you can make your failure detection much more aggressive,” he says. At the first sign of any problem, the system simply crashes. Although the idea seems counter-intuitive, this allows computer systems to be made much more reliable. Fox is working with an internet services company, whose name he is keeping confidential, to build crash-only web servers.

The job of hosting a large website may be shared between a number of computers. Currently, when someone logs onto the site, the information about their activities is kept in what is called a “session” that resides on a just one of the host computers. If that machine crashes, the user loses their session.

But by accepting crashes as normal, Fox can design the system to replicate the user’s session information over several computers that constantly communicate with each other. “You can crash any machine in that system at any time, for any reason,” says Fox. The user gets redirected to another machine without missing a beat.

Fox’s approach also allows him to detect faults in individual components within servers, crash these components and reboot them without bringing down the entire system. “We can repair parts of the application on the fly, without having the whole thing come crashing down,” he says.

The result is a far more robust system. In some of the protypes, crash-only web servers completed 78 per cent more user requests than an unmodified system when the researcher introduced faults into the servers.

“Once we understand the ideas a little better, we hope they will transfer over to Windows desktop programs,” Fox says.