I am looking for a way to prevent Windows from freezing. I know that because of the halting problem, there is no way to totally prevent any program from being in an infinite loop, but my problem is more tractable I think: I just want to detect freezes and do an action accordingly (kill process or reboot).
Sometimes, my work computer gets frozen for various reasons, which can range from a faulty program consuming too much RAM to an external USB hard drive that stops responding and makes the whole OS freeze.
However, I need my computer to always be up, because if it freezes it stops background computations that I left, and a freeze can go unnoticed, and it needs to be fixed in person (so no possibility to remotely fix by night for example), so a lot of time can eventually be lost.
What I am looking for:
- a way to detect freezes on Windows (7 x64). Is there any standard method?
- either kill the root of the freezes, or if not possible reboot the computer. Is it possible to detect the root of a freeze? Is it possible to (not physically) force reboot even during a freeze?
The end goal is that in case of a freeze, current computations might be lost but the computer will become available again ASAP (eg, for remote access to relaunch the computations).
My guess is that for such a program to work, it would need to run in ring0, above pretty much everything else, as to not get caught in the freeze (but that's a bet, I'm not sure if the freezes won't impact the ring0, but the freezes I target still allow for inputs to work like mouse and keyboard, so I guess ring0 might work too).
Constraints:
Very restrictive network security measures (no outside access, only inside computers can access the outside, eg, only UDP hole punching works for remote computer access), so using a remotely controllable internet plug is impossible for example.
No hardware change: I can plug additional hardwares to my computer, but I cannot modify the components already inside (eg, cannot change the motherboard, but can plug a PCI device or SATA or whatever).
For the moment, I am looking either for a software that can do this, or for technical information about how to do this myself (and if this might work or if that's just not possible), or any other solution that fits the constraints above.
I do not expect to fix every kinds of freezes using only a software solution, but I hope to at least workaround the type of "partial" freezes where the mouse and keyboard still work.
Thanks in advance.
NOTE: I am talking about non-BSOD freezes here. For BSOD freezes, Windows provide a setting to automatically reboot after kernel dump.