Re:Ask HN: Why is the Linux community struggling to implemen...
by hobonate on Thursday April 08, 2021 @05:34PM
(#26744033)
I agree that you should be able to suspend individual programs to disk, but I disagree with the idea that application developers should make their own suspend-to-disk functions, as they would all be basically implementing the same thing.
Instead, I think the kernel/OS should implement this feature instead (perhaps as a something like SIGINT that can be overridden). This would be great on hardware like the pinephone, where you have multiple programs vying for memory but only 1 app is really being used at any given moment (because of screen space). As far as I know this is already implemented in android somehow.
I think it would be simpler if the operating system suspended programs automatically, because it already knows how much memory the system has, the memory speeds, and all that, so it could probably figure the optimal way to shuffle programs around.
Of course app developers can make a restart less painful too. Web browsers have already implemented restoring tabs from the last use, and Outlook will automatically save any of your drafts. For any work in the cloud, you really just need a pick up where you left off cue.