3 ms·
How has Windows solved the problem? If anything it's more irritating on Windows as it refuses to overcommit so in a lot of setups if you don't have a humongous
by rcxdude 3y ago
How has Windows solved the problem? If anything it's more irritating on Windows as it refuses to overcommit so in a lot of setups if you don't have a humongous swapfile you will get OOM errors on random processes before you've even filled up physical RAM.
- Karunamon 3y agoDisk space is comparatively cheap. While it's a silly requirement, it's more usable than most Linux distros that burn every byte of free memory on caching and then turn the OOM killer loose to wreak havoc rather than release some cache.
- rcxdude 3y agolinux will always try to release cache before it invokes the OOM killer: this is part of why the OOM behavior on linux can be so pathological: the 'cached' data includes the code in executable files on disk, and so evicting them from cache in close-to-oom situations will often completely bog down the system with disk thrashing before the oom-killer gets invoked (this is why earlyoom and the like are a thing).
- IshKebab 3y agoYou press ctrl-alt-del and it brings up a privileged interface that lets you manually choose programs to kill. I don't know the details but I guess it's high priority or pauses other programs or something, but it fairly reliably works even if the rest of the system is unresponsive. Lack of overcommit probably helps a bit, but it's a bit of a red herring. The real thing that Linux lacks is a GUI integrated into the kernel. There's literally no way for Linux to do anything like this. (It might not actually require a kernel GUI but it definitely requires special treatment of the GUI by the kernel and it doesn't do that.)
- rcxdude 3y agoWindows doesn't have kernel-mode GUI. To the extent that task manager (and the ctrl-alt-del screen) is prioritized it's prioritized in user mode. And it's far from reliable in my experience: if the rest of the system is bogging down then task manager also tends to suffer, and I don't think I've ever seen it work in an OOM situation. Windows does have an early-oom like solution where it pops up a warning if you are getting close to running out of memory with an option to kill the highest-memory application, and it will also automatically expand swap if you have allowed it to do so great option if you don't like free disk space, but if both those fail it will crash hard
- IshKebab 3y agoWell, however it does it, it works pretty well. This post suggests it has at least some fairly tight integration with the kernel (and that it does work quite reliably): https://www.reddit.com/r/explainlikeimfive/comments/1pbctv/eli5_how_come_ctrlaltdelete_can_almost_always/ https://www.reddit.com/r/explainlikeimfive/comments/1pbctv/e...