What conditions cause hangs?


What conditions cause hangs ?

One common source of system hangs is a deadlock, or a situation wherein one process is waiting for something that is locked up by another process, which is itself waiting for something that the first process owns. Deadlocks can be caused by what is referred to as "race conditions." Put more simply, a race condition occurs when more than one program tries to use a given resource without agreeing on some sort of locking or control mechanisms. For example, if two routines both try to manipulate the same data structure in memory without locking mechanisms, who can predict the results?

Race conditions exist outside of computers. Imagine sharing a bank checking account with ten other people. If you don't agree ahead of time on some sort of rules on how to manage the account, you could soon find yourself with a financial mess on your hands.

System hangs can also occur when resources dry up and the system has to sit around waiting for more resources before it can continue doing what was asked of it. In this case, it would make more sense for the software to report the resource problem to the system administrator, but in some cases this may not have been a predicted scenario, so the code may not have been designed to handle it well, if at all.

Occasionally, system hangs can be caused by hardware problems. For example, if a problem develops with the data transfer cable attached to a disk drive (part of the "bus"), the communication between the system and the disk drive could become so unreliable that the two would no longer be able to work together. The result might be a hung bus, or a system so confused that it gets stuck in a loop trying to do nothing else but communicate with the dysfunctional drive.



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net