
Phantom OS, a Russian OS where “everything is an object” - traverseda
https://en.wikipedia.org/wiki/Phantom_OS
======
twotwotwo
One thing it took me a while to realize is that a lot of what's provided by
"OSes", the way users think of them, is _standards_ : ABIs, protocols,
formats, etc. And you can play with those in userspace. I am not saying
kernels don't matter or anything, just that the kernel is not the only place
one can play with radically different ways to organize stuff.

So: if you want code to communicate and share capabilities through objects in
a memory-safe environment, you can do that. (Browsers without strict site
isolation often do this with cross-site iframes.) If you want to serialize
state so you can stop and restore across reboots, you can do that. (CRIU does
something like this, for apps not written for it even.) Sufficiently advanced
language environments and runtimes often end up redeveloping OS-y bits
(schedulers, binary formats, standard ways to exchange data).

A big problem, as with completely new OSes with their own kernels and syscall
interfaces, is getting people to develop to your interfaces. But it would be
(is!) interesting to see folks build alternate universes in userspace that are
much easier to dip into.

~~~
roryrjb
So I believe I'm correct in saying that this is what Microsoft effectively
does with WSL and Joyent does with Triton, i.e. faking a Linux kernel syscall
table on top of a Windows NT kernel and Illumos kernel respectively.

~~~
twotwotwo
WSL does some interesting stuff, including some new code running in kernel
mode (there's more here: [https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-
system-c...](https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-
calls/)). No idea about Triton. gVisor is a user-space process providing a
restricted Linux interface on top of regular-old Linux via syscall
interception provided by ptrace. They all certainly demonstrate decoupling the
"personality" presented to app code from the original interface of the kernel.

I'm trying to say something a little different, which is that lots of things
conventionally thought of as OS design issues are not inherently about
syscalls and ring 0, and can be (and are) worked on in userspace. Like, you
can have capability-based interaction between mutually untrusted bits of
memory-safe code (the model of this OS) inside a Unix or Windows process, and
you can do a lot of other exploration of how to organize/format/communicate in
userland. The kernel interface provides necessary tools but it's not all there
is.

Of course kernel-side improvement is still important; foundations matter.
Just, thinking big does not only have to mean replacing or even tweaking the
kernel.

------
traverseda
I thought this was interesting, it's not often I'm exposed to significant
projects where the primary language isn't english. With all this new
webassembly stuff it will be interesting to see if an approach like this takes
off.

~~~
slezyr
webassembly will make no difference at all. You still need to know english to
learn how to program and read docs for libraries. It takes ages for translated
books to appear, but even then most of them will be obsolete, especially for
new tech like webassembly.

~~~
traverseda
When I say "maybe an approach like this will take off" I'm not saying "maybe
we'll all be doing our programming in russian using phantom os".

I'm saying that webassembly might ultimately evolve into something that look a
bit like this, since it has almost-free IPC.

------
_bxg1
Looks like the last GitHub commit in the linked repo was 2 years ago; does
anyone know if the greater project is still alive?

------
als0
Persistent virtual memory is the future.

~~~
_0ffh
I'm not sure it is a good idea, performance wise. A database application can
use differently optimised strategies (data structures, etc.) for memory or
disk access. It can't if it doesn't know what's in memory, or on disk.

~~~
Someone
Presumably, one can still lock down pages in memory
([https://www.freebsd.org/cgi/man.cgi?query=mlock](https://www.freebsd.org/cgi/man.cgi?query=mlock),
[http://man7.org/linux/man-pages/man2/mlock.2.html](http://man7.org/linux/man-
pages/man2/mlock.2.html)).

So, build default data structures as if everything is swapped out, and add
structures designed for use in memory for caching that data.

Alternatively, only use structures optimized for in memory use, and trust your
OS to keep the active set paged in (easier, but can harm performance if you
have much more data than RAM)

------
guicho271828
Sounds like Lisp Machine Lisp reborn.

~~~
altmind
Reminds me of old 80ies Smalltalk environments.

* everything is an object

* image-based persistence

I believe you cannot much traction in 2019 by merely claiming benefits of
being object-oriented. These times are long gone.

The basic ideas of OO(extension by inheritance, coupling data and code=poor
concurrency, wrong abstractions = expensive rewrites, wrong incapsulation =
impossibility to change behavior) turned out problematic in use.

I'm still waiting for OS that positions itself to be "100% async" \- every
operation/event is a future/promise/callback, everything can be hooked, is
progress-trackable and cancellable. That what I can stand behind.

~~~
pjmlp
Opportunity lost, you could have gotten an WP 8.x device.

