electron1212
electron1212
Branch Unspecified
03 Nov 2008

Ctrl+Alt+Del : Why does the computer hang?

Why computer hangs ? Is it deadlock ?? Is it some device working disorder ??? what is it actually ???😕
Lets discuss
Raviteja.g

Raviteja.g

Branch Unspecified
03 Nov 2008
interesting question!
waiting for replies
electron1212

electron1212

Branch Unspecified
03 Nov 2008
Deadlocks are least possible though. They are very rare in OS. That is the reason why most of the OS present ignore the problem altogether and pretend that deadlocks never occur in the system. So they don't have any algorithm for deadlock detection/avoidance/prevention. Because of that they can't recover from the state when deadlock occurs. But as i said that deadlocks are very rare so avoiding the use of these algorithm is more cost effective and efficient. But you can not discard deadlocks as the reason computer hangs. But if that is only reason why computer hangs, then we have one or two hangs in a year😛.
Prasad Ajinkya

Prasad Ajinkya

Branch Unspecified
04 Nov 2008
Could be due to multiple of reasons -
1. CPU utilization goes to 100%
2. A program starts thrashing
3. Process queue for the CPU is so much that it cannot process all of them and slows down
electron1212

electron1212

Branch Unspecified
05 Nov 2008
any more ideas ???
Ashraf HZ

Ashraf HZ

Communications
05 Nov 2008
What is a deadlock? 😀
sriramchandrk

sriramchandrk

Branch Unspecified
06 Nov 2008
Computer may hang for number of reasons.

Few reasons are:
1. May be a problem in hardware. Most of the time it will be due to RAM.
2. Deadlock may hang few process, and if they are important ones then you feel like the system has hanged, where as processes are waiting for resources to be released by other processes.
3. Memory images of code getting corrupted may be due to glitches or even due to faulty programs.


Deadlock can be explained this way.

Think there are 2 resources A & B and with a condition that at anytime only one can use the resources.

for example a file(resource) can be opened for write by only one process at a time, if other process tries to open it will be asked to wait.

Let there be 2 process P1 & P2

P1 is using resource A and at the same time it asks for resource B, still it has not freed resource A.
P2 is using resource B so OS stops P1 until resouce is freed by P2.
Meanwhile if it happens that P2 asks for resource A even before releasing B. then the condition is called Deadlock.

P1 is waiting for P2 to release B
& P2 is waiting for P1 to release A.

Only OS can resolve this race condition. for example by giving error to P1 after certain time that Resource B is busy etc.,

Thanks & Regards
Sriram

Share this content on your social channels -

Only logged in users can reply.