- This article is about the computer malfunction called hanging. For the capital punishment, see hanging
In computing, either a single computer program or the whole system may "hang" or become unresponsive to keyboard and mouse inputs. 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 includes 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.
Hangs are not limited to client personal computers with a graphical user interface, as in the example above. Servers can hang as well. 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.
Pre-emptive multitasking operating systems, such as Microsoft Windows 2000/XP/Vista, Apple Computer's Mac OS X and Linux hang 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. If a task does hang, the scheduler may switch to another group of interdependent tasks so that all processes will not hang.[1]
Causes
Hardware can cause a computer to hang, either because it is intermittent or because it is mismatched with other hardware in the computer[2] (this can occur when one makes an upgrade). Hardware can also become defective over time due to dirt or heat damage.
A hang can also occur due to the fact 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 software-related hangs are caused by threads waiting for an event to occur which will never occur.[3] This is also known as an infinite loop.
A computer may seem to hang when in fact it is simply processing very slowly. This can be caused by too many programs running at once, not enough memory (RAM), or memory fragmentation. It can also be caused by hidden programs which were installed surreptitiously, also known as Spyware.
Solutions
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.
A watchdog timer can reboot the computer in events of a hang
References
See also
|