Hang (computing)
From Wikipedia, the free encyclopedia
Please help improve this article or section by expanding it. Further information might be found on the talk page or at requests for expansion. (January 2007) |
In computing, either a single computer program or the whole system may "hang" or become unresponsive to keyboard and mouse input. The term "hang" is synonymous with "freeze," the more commonly used term. In a hang, the window affected or the whole computer screen becomes static, the latter case including the mouse cursor. It is contrast with crash, where a program stops working and is not responding, or exits abnormally after encountering a problem. When no other input works, the power cycle must be restarted by an on/off or reset button. While the system is frozen it conducts a noise when you move the mouse.
Of course, hangs are not limited to client personal computers with a graphical user interface, as in the example above. Servers can hang, too. In those cases, the server ceases to respond to requests. These sorts of hangs are typically addressed by a solution far more complex than an on/off or reset button.
The cause of a hang is usually that the programmer has incorrect termination conditions for a loop, or, in a co-operative multitasking operating system, forgetting to yield to other tasks. Said differently, many hangs are caused by threads waiting for an event to occur which will never occur.
Usually, in systems with a modern operating system, the user is able to terminate the programs running (for instance, with the kill command, or through the "end task" button on the task list in recent versions of Microsoft Windows), and, if they wish, restart it in the hope that the anomalous condition that caused the hang does not recur. Older systems, such as those using MS-DOS or Microsoft Windows 3.1, often needed to be completely restarted in the event of a hang.
Pre-emptive multitasking operating systems, such as Microsoft Windows 2000/XP/Vista, Apple Computer's Mac OS X and Linux crash less often as the multi-tasking system is not affected by non-terminating loops and further does not require tasks to yield control to the operating system.
A watchdog timer can reboot the computer in events of a hang.