by lobster_johnson · 9y ago · 0 comments
The design also seems extremely sensible and modern: Everything is namespaced and sandboxed (there's no default "/"), everything is an "object" (sounds similar to Plan 9's file descriptors), capabilities from the ground up, standard RPC between OS components (FIDL, similar to COM or XPC), built-in package management (looks like apps aren't globally installed by unpacking archives, but rather they're run directly from packages, and the process gets the archive file system mounted in its namespace), etc.
While Google seems to be aiming for phones, I wouldn't surprised if this ends up as an option on Google Cloud Platform in a few years' time.
The nice thing about Plan 9's everything-is-a-file setup is that everything has the same file-like interface. Saying everything is an object does nothing to convey any sort of standard interface.
Rob Pike replies here[1] that direct framebuffer access and networking are easy to get as new devices, although they need to be made available by the kernel. The "everything is a file" mantra doesn't fail, why would it?
In the second link, Carmack just notices that plan9 is pretty dead, and we all know it is :)
Everything is a file is how X Windows over network kind of works.
For real graphics performance that can match other systems, xshm and DRM had to be developed.
According to Google, Fuchsia is designed for:
modern phones and modern personal computers with fast processors, non-trivial amounts of ram with arbitrary peripherals doing open ended computation.
In XNU, things like file systems, graphics and device drivers are all running in kernel mode, in the same address space as the kernel. The Windows kernel has the same design -- it's designed as a microkernel, with separate modules internally that communicate via a form of IPC, but everything is running in one process (as opposed to a real microkernel architecture where file systems etc. are userland processes).
With XNU, Apple forked Mach 3.0 and have been making a lot of changes to it over the years, even though Mach itself has progressed since then. On the other hand, XNU inherited Mach's high syscall overhead (considerably higher than Linux), and to my knowledge Apple has moved a lot of stuff into ordinary syscalls rather than Mach messages to remove this overhead.
Edit: Interestingly, around the time before Leopard, when Darwin was still a thing, there was a research project called Darbat [1] that tried to supplant parts of Mach with L4, a more modern microkernel, and actually run XNU as a userland process on top of it. Unfortunately, nothing came of that project.
[1] https://en.wikipedia.org/wiki/User-Mode_Driver_Framework [2] https://docs.microsoft.com/en-us/windows-hardware/drivers/wd...