Best practices when a computer freezes or a program is “not responding”
May 14, 2021 12:34 PM   Subscribe

First, when a computer stops stone cold and ctrl+alt+dlt does nothing, is there anything that can/should be tried before holding down the on/off switch so the computer restarts? Second, when a program is “not responding,” Windows gives two options: to wait until the program responds, or to close the program. I always choose to close the program, but are there times/circumstances when waiting is a better choice? Likewise, are there times/circumstances when closing is the better choice?
posted by BadgerDoctor to Computers & Internet (6 answers total) 7 users marked this as a favorite
 
So from a technical perspective, what's happening is: any program with a GUI operates in a continuous loop of "receive event from OS -> respond to event". The event might be a user clicking a button, or a packet of data arriving over the network, or a periodic timer going off. And the response might be to do some computation, or tell the OS to pop up a dialog box, or redraw the contents of a window after it's un-minimized.

Normally, a program should respond to each event quickly in order to be ready for the next one. (If there's intensive, time-consuming work that needs to be done, it should happen in a background thread.) When a program is "not responding", that just means the OS noticed that the program hasn't checked for new events in a few seconds.

The root cause could be that the program's main thread entered an infinite loop because of a bug, and there's nothing useful to do except kill it. Or it could be that for some reason, a task that ordinarily should be very quick is taking a much longer period of time. In particular, if your system is very short on memory, data that would normally be stored in RAM has to be swapped out to your disk instead, which is quite a few orders of magnitude slower. In this case, the program might still be making progress towards being ready for the next event, but there's no way to be sure whether it'll take a minute or a month to complete.

Because the operating system can't reliably determine whether the program will eventually make progress, it just leaves the decision of whether or not to kill it up to the user. If you have really important data that hasn't been saved, and you know from experience that this particular program sometimes gets stuck and recovers, you might choose to wait instead.

If your entire system locks up, that just means essentially the same thing is happening, but at the operating-system level. This could be because you're so short on memory that critical system tasks got swapped out to disk, or it could be because of a buggy driver or faulty hardware device.
posted by teraflop at 1:28 PM on May 14, 2021 [9 favorites]


First, when a computer stops stone cold and ctrl+alt+dlt does nothing, is there anything that can/should be tried before holding down the on/off switch so the computer restarts?

Usually not, in my experience.

It depends on why and how the system has stopped responding, though.

It could, for instance, be an input issue - e.g. the USB controller or its driver has stopped working, so the system is no longer getting keyboard and mouse inputs, and appears hung but is actually working. In this case you might notice that the clock still changes, or a text cursor still blinks. If you had some way to connect a different input device that was unaffected (e.g. through a port on a different USB controller, or a PS/2 port) you might be able to regain control.

Or it could be an output issue - e.g. the graphics card or its driver has crashed such that the system is still running but the display is not updating. In this case you might still be able to e.g. press Ctrl-S to save your document, or work out what key sequence will shut the system down safely.

In either case, if you have remote access to the computer over a network, sometimes it's possible for that to still work even when the GUI has locked up to the point where it doesn't respond to Ctrl-Alt-Del.
posted by automatronic at 1:33 PM on May 14, 2021 [1 favorite]


On a Windows PC, one diagnostic test you can do to see if it's at least kind of awake is to hit NumLock. The state of the little light on the keyboard is controlled by the OS, not the keyboard. If you can turn that light off and on via the keyboard, that means that at least part of the system is still responding to external events (i.e. you pressing NumLock). If you can't toggle the light, then it's probably gone for good.
posted by Hatashran at 1:55 PM on May 14, 2021 [10 favorites]


When the whole computer locks up, there's really nothing useful you can do except restart it. In fact, that's probably going to be the first thing I do even if I get control back, unless I need to attempt to save some document first.

For individual programs "not responding", I usually kill them with task manager UNLESS I know the reason it's not responding. On my work computer it's pretty frequent for a program to claim not responding for a few minutes because the (goddamn) Tanium client and antivirus scanner are both running the disk at 100.0% for long periods of time without sharing. (Another benefit of opening task manager: I can see that's what it is.) And just wait.

Outlook is the worst about whining about "not responding" if the network is at all slow or it has to wait a few milliseconds on the disk. It usually recovers if I wait. Other programs aren't ever going to fix themselves. You just have to kind of get a feel for it.
posted by ctmf at 6:24 PM on May 14, 2021 [1 favorite]


If it’s the whole OS that is grinding to a halt, and not just one program, you’re probably running out of memory. You can verify this by keeping the task manager open and keeping an eye on how much memory you’re using. If that’s the case, adding more RAM is likely worthwhile.

(And for me, randomly running out of RAM usually coincides with having a bunch of Chrome tabs open)
posted by qxntpqbbbqxl at 6:58 PM on May 14, 2021


I open task manager and find the offending program, then watch the memory usage. If it isn't changing, then I kill the program. If it is changing, might be good to wait a minute.

Also,I look at the performance tab before doing a reboot.
posted by rudd135 at 6:38 AM on May 15, 2021


« Older What's the deal behind Colgate Gum Revitalizing...   |   rain and/or hiking pants for woman with fat thighs Newer »
This thread is closed to new comments.