- Hang (computing)
:"This article is about the computer malfunction called hanging. For the capital punishment, see hanging"
In
computing , a hang or freeze occurs when either a singlecomputer program or the whole system becomes unresponsive to keyboard and mouse inputs. 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 asMicrosoft Windows 2000 /XP/Vista,Apple Computer 'sMac OS X andLinux 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 atask does hang, the scheduler may switch to another group of interdependent tasks so that all processes will not hang. [Citation | inventor-last = D'Souza | inventor-first = David | publication-date = 1996-06-21 | issue-date = 2000-04-18 | title = Preemptive multi-tasking with cooperative groups of tasks | country-code = US | patent-number = 6052707]Causes
Hardware can cause a computer to hang, either because it is intermittent or because it is mismatched with other hardware in the computer [cite press release | title = How to Troubleshoot Computer Hangs During Hardware Detection | publisher = Microsoft Help and Support | date =
2007-01-27 | url = http://support.microsoft.com/kb/262381 | accessdate = 2008-07-31] (this can occur when one makes anupgrade ). 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, manysoftware -related hangs are caused by threads waiting for an event to occur which will never occur. [cite newsgroup | title = Here's an infinite loop that will hang your machine | author = Calvin Hsia | date =2006-11-16 | newsgroup = blogs.msdn.com | url = http://www.feedsfarm.com/article/8738c4141d9874d6e05f6a3e57369280014c7081.html | accessdate = 2008-07-31] This is also known as aninfinite 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 ), ormemory fragmentation . It can also be caused by hidden programs which were installed surreptitiously, also known asSpyware .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 ofMicrosoft 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 usingMS-DOS orMicrosoft 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 hangReferences
See also
*
Abort (computing)
*Anomaly in software
* Blue screen of death
*Crash (computing)
*Deadlock
* Livelock
*Infinite loop
*Uninterruptible sleep
Wikimedia Foundation. 2010.