4 ms·
> Its primary goal is to provide environment for programs thatsurvive OS reboot. Such an environment greatly simplifies software development Simplifies? I can'
by qwerty456127 5y ago
> Its primary goal is to provide environment for programs thatsurvive OS reboot. Such an environment greatly simplifies software development
Simplifies? I can't even imagine such a program. To me a program is something that starts and ends and can also re-start with a fresh state in case something goes wrong.
- WalterGR 5y agoWhat’s the iOS programming model in this regard?
- thatjoeoverthr 5y agoSomething like “crash-only software”; programs are expected to be killed and relaunched. Software should cope with it, as there is no swap space and ideally the user shouldn’t be managing memory. An app may create to some degree the appearance of persistence but it’s not persistence. Users, also, can easily force kill apps. Ongoing background operations like downloads, uploads and some media playback is delegated to the operating system. Such operations continue when your process is killed, and you check up on them when your process starts. I hope it’s not TMI, but the standard library includes atomic file saves.
- WalterGR 5y agoThank you!
- hsbauauvhabzb 5y agoWhat about some middle ground? I’d like my IDE to remain constant between reboots, my browser to some degree is already (if it crashes, it reopens all current tabs on start, which is effectively the same). I would have thought some clever hacks on an existing kernel would be reliable enough rather than an entirely new OS just for one feature, though.
- webmobdev 5y agoIsn't that what Hibernation offers on Windows?
- hsbauauvhabzb 5y agoGood point. I’ve not even tried to hibernate a Linux machine in 10 years though so I have no idea if it works there
- timka 5y agoSort of like that but you don't have to wait until all your 16Gb of RAM are written to disk. AFAU, Dmitry found a cheap way of making consistent snapshots of a running system. BTW, there was a thread on HN relatively recently where someone mentioned that the hard part of hibernation is not restoring the RAM state but bringing all hardware into the right state at boot. That's why hibernation has been so problematic on Linux.
- cdogl 5y agoThat does sound great, but realistically any application needs to be able to recover from a crash anyway - so even with this support from the OS, you just have a new code path to support. Might be nice for users, but it certainly doesn’t simplify anything for developers.
- jcelerier 5y agoThe IDE I use, QtCreator, works like this: if you reboot or it crashes you can just restore the previous session on startup and it will bring you exactly where you were.
- qwerty456127 5y agoWhy do we need this in a kernel? Why not just serialize the essentials of the apps states and re-load it after reboot/sign-in? I'd prefer the desktop environment to remember which apps were running including which documents were opened in them and their windows positions and just re-launch everything at start-up. Given how fast does everything cold-boot today thanks to modern SSDs, I wouldn't even use standby/hibernate if this worked this way.