Iqaluit, Nunavut, Canada
All computers lock up or crash, and no operating system is immune (as a matter of fact, we crashed once as we wrote this answer), but singling out specific reasons oversimplifies the issue, explains Daniel Jackson, a computer science professor at the Massachusetts Institute of Technology. The underlying cause, Jackson says, is that hardware and software developers are trying to bring products to market in "Internet time"-that is, hyperfast. The result: Quality and reliability suffer.
Consider an operating system. These enormous programs are written by hundreds of programmers and contain millions of lines of code. Bringing the work of so many people together is daunting, and the end result is rarely perfect. To find the software glitches, developers hire testers when the program is nearly complete. When problems are found, patches-the programming equivalent of a Band-Aid-are written to correct them. They indeed stop the crashes, but the original code is never deleted. Also, Jackson says, "testing doesn't emphasize design-level flaws."
There are three main sources of crashes: applications, device drivers, and operating systems. The vast majority are caused by the first two. An application often fails when it tries to access or modify another program's memory; if, for example, Microsoft Word began using the memory space reserved for Microsoft Excel. This scenario is akin to a chess game in which one player starts moving the other player's pieces-once the other player or a judge notices, it's "game over."
The failure of a word processing or browser program theoretically shouldn't cause the entire computer to crash, but often does. That's because the operating system is like the aforementioned judge. It notices one application modifying another application and blows the whistle because it can no longer vouch for the integrity of the computer. Different operating systems respond to this problem in different ways. Older versions of Windows, for example, respond with the "blue screen of death." More robust operating systems, such as Windows XP and Linux, build virtual walls around each application, so that even if one program does not perform as intended, it cannot disrupt other programs or cause the entire computer to freeze.
Device drivers are programs that allow the operating system to communicate with the computer's hardware. Bugs are often discovered after a product is released, and it's common for manufacturers to release updated drivers years after a piece of hardware was introduced. Newer applications (image-editing programs come to mind) usually require the most up-to-date driver. To help eliminate driver-inspired freezes, Windows XP-which Microsoft asserts is 10 times more reliable than older versions-automatically checks the status of drivers. Drivers for older computers can be found at the manufacturers' Web sites.
Your operating system rarely causes a crash directly, but there are several ways it might. It could, for example, misplace a program in the computer's memory. Unable to verify the contents of the memory, it soon becomes unstable. Operating-system bugs can also be exacerbated by hardware and software add-ons.
Edited by Bob Sillery
Research by Rob Barnett and Emily Gergeron
Five amazing, clean technologies that will set us free, in this month's energy-focused issue. Also: how to build a better bomb detector, the robotic toys that are raising your children, a human catapult, the world's smallest arcade, and much more.