5 ms·
Doesn't that kind of assume that a) there is only one user b) they are logged in c) they will be able to respond in a timely enough manner to allow other pro
by Karellen 3y ago
Doesn't that kind of assume that
a) there is only one user
b) they are logged in
c) they will be able to respond in a timely enough manner to allow other programs to allocate memory shortly
edit: d) there will be enough memory to start a program that is responsible for asking the user, and if it needs to connect to a display server then the display server will be able to allocate memory for surfaces that program can draw to to display the request to the user.
- IshKebab 3y agoYes. You can make it work on desktop. Not really an option on the server of course. I was indirectly pointing out how Linux on the Desktop is never really going to happen for normal people while the kernel devs ignore obvious desktop requirements like this. Windows solved this problem over 20 years ago.
- rcxdude 3y agoHow 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...
- zokier 3y agoA) and b) are not really a problem (you don't need solutions to be universal to be useful), c) is solvable (e.g. pause any programs trying to access unavailable memory), d) is trivial, implement it as daemon that has pre-allocated (and locked) sufficient memory