• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Computer Unresponsive / Frozen

chrstrbrts

Senior member
Hello,

I'm not sure where this question belongs, but it's programming-ish so I'll post here.

Whats happening with the software / hardware interface when a computer is frozen or not responding?

Is the processor stuck in some kind of infinite loop?

Can you write code that will make the computer freeze on purpose?

How about writing code that tells the processor to keep jumping from one RAM location to another indefinitely? Would that freeze the computer?

Thanks.
 
All you see from the user perspective is that the machine won't do anything in response to your inputs. There can be many explanations for this under the surface. All of them have as their foundation the simple fact that the input queue is no longer being serviced. This can be because the whole system has gone south at a very low level, and it can also be because a single application is blocked and not handling threads correctly. In most modern systems that latter case won't lock up the whole computer, but will make one application appear to be frozen.

As to whether you can write code to freeze a system, certainly. I did it yesterday when I forgot to change a config variable and launched 160 processes at once on my Ubuntu box.
 
Mark is right. The most common cause of an application freezing that I've seen is that someone is doing too much work on the event handling thread.

So for example, clicking a button causes the program to go out and fetch 1000 records from the database on a remote server. The easiest thing to do is go do the fetch and extra work right when the button is clicked. However, doing that requires the application to wait until everything there is done. For small tasks under 60ms (which you can do a whole lot in 60ms) this doesn't matter so much. For large tasks it can be a killer.

How about writing code that tells the processor to keep jumping from one RAM location to another indefinitely? Would that freeze the computer?

That would freeze the process, but the computer would be fine. About the only way to freeze the whole computer is by launching more threads/processes than the OS can handle. There is no implicit lock on memory.

You may be interested in this

http://en.wikipedia.org/wiki/Fork_bomb
 
Back
Top