Phantom OS: Persistent Operating System
github.com
github.com
The project is falling into the "simplification trap", where all it's doing is moving inherent complexity around (which eventually requires users to do a bunch of work-arounds) rather than eliminating it (because inherent complexity can't be eliminated; only needless complications can be eliminated).
In theory, this sort of setup would be nice in a perfect world, but in the real world of buggy software and faulty hardware and cosmic rays and failing network connections, it's a disaster waiting to happen.
This is why we have a clear delineation between persistent and ephemeral state.
So if your text processor crashes, your documents go bye-bye.
I've never seen a framework or OS-support such fine-grained persistence and failure management. It's strange because almost every application needs something like this, and if it's just to reset a faulty preferences file. I've always thought that these kind of features should be provided by the OS, together with indexing and better guarantees for file integrity (e.g. ACID-compliant atomic file operations).
Systems that eliminate this difference massively increase the damage surface of your data by forcing both kinds to be treated equally and even intermix. And since software will always have bugs, your fallout damage increases exponentially.
It's a lot like naive state saving code that just dumps an in-memory struct to disk: The moment that struct changes (adding/removing/changing a type or size), your load code breaks.
Yes, a lot of bugs are never going to be fixed, and we'll have to restart the machine occasionally... but Phantom's alternative is forcing machine reformat on any bug.
You can do this today: just add a crash handler that will erase your entire hard disk. Do you think this will make software less buggy?
The whole point of Phantom OS though is that there is no separation between them. Instead of having files, you just keep the data in your program's memory, and rely on automatic system-wide persistence to keep it safe. So the only thing you can roll back is entire system.
Now a second and genuine follow up and wildly generalized question:
What if, given that information isn't lost (no-hiding theorem), death in the biological platforms is a reset for consciousness to continue its evolution after a renewal of any state pollution?
The study of epigenetics is the realization that cells don't have exec(), only fork(). Most state transfers to the child cells and isn't wiped during reproduction.
Your app crashed? No problem - Rewind 5 minutes earlier and don't do the thing that crashed it.
There's whole unexplored universe of possibilities when we do away with traditional OS design. I'm especially interested in how it would work with Intel Optane.
On rooted Android I could clear corrupted app data.
Static image is indeed a nice feature I like.
Create a working image from a clean image + code archive.
Sanity prevails.
[0] By which of course we mean Linux.
- Persistent OS'es are a thing since BOOTP boots for example with OpenBSD or alpine on "diskless" mode.
Thank Unix for that for being so simple to implement.
Also, you've missed the point of the Linux comment. I'll spell it out: typically people who revere UNIX in the way described have never in their lives used a UNIX system other than Linux (unless it was MacOSX+, of course). Is that relevant? Not really, that's why it is a footnote.
However, in the current days where rebooting is seen as normal for an OS upgrade, but most of the time people just put their computer to sleep, the main problem is that all the network interfaces are effectively useless when the system wakes up because most connections will have long since timed out due to lack of connection acknowledgement packets. In such a case, systems will have to tear-down and re-create a lot of state anyway.
The actual issue this seems to solve, that of saving memory state and restoring again, is already solved for most use cases except OS upgrades by using sleep mode. But the hard case about network connections is still unsolved for this system, and by solving the problems it does solve with yet another VM-based environment it'll probably be doomed to obscurity unless common existing applications and virtual machines can easily be made to run on-top of it.
This is - and probably always will be a problem with networked software. You should program as if TCP connections could drop at any time, for any reason. Browser tabs get backgrounded. Laptops go to sleep. Cell phones roam, and go into tunnels. Servers have temporary net splits.
Most high level tasks can be retried safely. Nonces and things can be used to safely retry almost anything else.
I miss the simplicity of IRC, the way slack and discord smoothly transition between online and offline states is graceful and intuitive. That is how almost all software should behave.
Also, IIRC Dmitry was thinking about embedded systems applications at least back in 2011 when he was giving a talk about PhantomOS at HighLoad++ conference in Moscow.
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.
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.
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.
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.
It removed the need for a filesystem or any of the usual patterns for retrieving data like SQL so a whole class of programming that people think of as "normal" today just vaporised.
Persistent programs seem like a logical-ish next step but I wish the first step could have been taken because it was very nice to program in.
“The software rebooted and reinitialized the computer, and then restarted selected programs at a point in their execution flow near where they had been when the restart occurred.” [0]
(more details on Apollo 11 problem: https://www.doneyles.com/LM/Tales.html)
Resource exhaustion was not immediate after reboot because the faulted tasks were low priority and did not get started after reboot right away. I can't even imagine what would have happened if one of the high priority tasks had been the problematic one.
That's wrong. Excess CPU time was stolen by radar counter hardware, not by any software (counters worked by stopping CPU and using its ALU). Problem arised because main guidance routine (SERVICER job) was scheduled always every 2 seconds (by READACCS task/interrupt), and with excess stolen time it didn't finish in time, leading to scheduling of another SERVICER before previous instance finished. This repeated until memory ran out for stacking another SERVICER job. There was no "erroneously-scheduled rendezvous radar jobs", job that needed shedding was multiple stacked instances of SERVICER itself.
Phantom OS, a Russian OS where “everything is an object” - https://news.ycombinator.com/item?id=19672610 - April 2019 (23 comments)
I think that you would like to limit the actual data to persist to the data that needs to be be persisted — that which can't be recreated quickly, purely from other objects.
I just had the question of 'whatever happened to ksplice?' and immediately found my answer of 'oh oracle' no wonder nobody talks about ksplice anymore.
But there have been several others also based on similar ideas, such as Mungi.
In recent years, there is Twizzler, intended for NVRAM. <https://www.youtube.com/watch?v=0Ix5DYKxzLI>
Also a criteria is code that modify itself without recompiling.
This also considers a power source like a nuclear battery or something that will last a long time or alternate in the low power state/ambient or whatever energy.
It will be an exciting time for user interface development.
Possibly we could see networked collaboration/"multiplayer" at the OS level.