News for hackers. Stuff that matters.
Re:Phantom OS by Asmod4n on Friday March 25, 2022 @08:29PM (#30808250)
macOS does something kinda like it. For when your battery dies you just have to boot the machine and all running apps will sort of start in their previous state.
Re:Phantom OS by paxys on Friday March 25, 2022 @08:51PM (#30808350)
That really depends on how well the app manages its own state and specifically handles restarts. No mainstream OS can restart without running apps even knowing it.
Re:Phantom OS by zozbot234 on Friday March 25, 2022 @11:47PM (#30809093)
A planned restart is just hibernation to disk, which is implemented in many OS's.
Re:Phantom OS by Asmod4n on Saturday March 26, 2022 @02:35AM (#30809769)
If you got a Mac without a battery you can try to write something in pages and just yoink the power cable. Upon the next boot pages should open with your document and not lost anything.
Re:Phantom OS by jonhohle on Friday March 25, 2022 @10:25PM (#30808759)
It’s possible with virtualization and containers. In those cases, to be fair, there applications are running in an environment that may not be aware it was restarted.
Re:Phantom OS by FredPret on Friday March 25, 2022 @11:24PM (#30809000)
What if we're a simulation unknowingly getting a restart every time Johhny the alien closes and opens his laptop?
Re:Phantom OS by adastra22 on Saturday March 26, 2022 @03:51AM (#30810071)
Isn’t this exactly what hibernation is?
Re:Phantom OS by checker659 on Friday March 25, 2022 @09:51PM (#30808624)
How is that any different from hibernation?
Re:Phantom OS by jonhohle on Friday March 25, 2022 @10:21PM (#30808746)
Memory isn’t snapshotted and dumped, then restored by the OS in a way that user space is largely unaware.

macOS/iOS has adopted a model of giving apps an opportunity to persist their own state before being terminated (which may be eagerly to reduce memory pressure or power consumption, for example) and then have the application restore its own state in whatever way is appropriate.

Outside of containers, hibernation almost needs to be a system-wide operation, which makes it inappropriate for OS updates, restoring from crashes (which, I suppose is what Phantom OS is trying to resolve), or hardware changes.

Re:Phantom OS by zozbot234 on Saturday March 26, 2022 @07:09AM (#30810842)
Note that "containers" is basically kernel-implemented namespaces, which is why a containerized app can be checkpointed and restored independently: they can preserve the semantics of kernel resources across runs. You could have just about any arbitrary app running in a "container" with it being none-the-wiser about it: it doesn't necessarily impact userspace support.