4 ms·
I wish there was a reasonably speced out microkernel OS that, if not gaining traction, wasn't based in conspiracy theory or academia but in the practical benefi
by zanny 14y ago
I wish there was a reasonably speced out microkernel OS that, if not gaining traction, wasn't based in conspiracy theory or academia but in the practical benefits of having it.
I see a very beautiful world where a small kernel could handle preemptive scheduling, virtual memory, and provide a virtual file system and virtual socket abstraction. Devices could use the socket layer and file system to take control of DMI devices provided by the firmware, but still run in userspace. If you used the plan9 "everything is a file" model, system devices could easily exist in their own directory, etc.
Then you use a newer privilege model, where an application derives its rights from its parent, who can either down-cast their rights or keep them at the same level as the parent, and the privileges influence the application specific view of the file system (like in Plan9).
For IPC, I'd really want to put in an effort to use the lower range ipv6 addresses in a highly optimized virtual socket dispatch so you could have one protocol to rule them all. Every IPC and remote communication, to any device, to any service on any machine, could be done over an abstracted ipv6 layer. Screw the maligned utility of dbus, unix sockets, RPCs, etc, use what you already have and optimize the hell out of that.
Also, I'd like to see a reasonable and sane file system. I like how /usr in Unix has nothing to do with a user anymore. How some systems expect /cdrom to be a thing in an era where a tremendously small fraction of machines have baked in CD roms, and those would be SATA devices if not USB externals. The Linux and OSX top level file systems always drive me nuts.
I'd use that visibility privilege model to have multiple users - an all user, public user, root user. System binaries would be under root, users would have visibility on themselves and any other user they are given access rights to (passworded or not) including the all and public. You can install and compartmentalize binaries and libraries appropriately. If you want a jail, create a user without any access privilges on other users, and they can only run in a personal vacuum. If you do a good security model where only applications within +/-1 of the privilge heirarchy can see in the socket layer another process, a jailed user would only have visibility on servers like what we have in pulseaudio and X instead of hardware like the gpu or alsa, and those services could be steeled against aggressive input.
Such a system I feel would be a breath of fresh air for writing applications. If the runlevels were something like:
0: kernel
1: hardware devices and init
2: hardware service servers, daemons, and login manager
3: max privilge user session, possibly more login managers and daemons to support lower privileged users.
4..n: restricted user sessions with limited views of other contexts.
Any layer could explicitly passthrough a higher level service or daemon to visibility on the lower tiers, but it would need to be explicit, you have a very limited scope by default.
I'd love to write software in a context like this. Security sounds better to me, communication is unified, and what you see (in the filesystem) is what you get.
- MrVitaliy 14y agoHave you seen http://en.wikipedia.org/wiki/MicroC/OS-II http://en.wikipedia.org/wiki/MicroC/OS-II ?
- GeorgeTirebiter 14y agoAnd don't forget http://www.minix3.org/ http://www.minix3.org/ which, although unix-like, certainly tries some new things (e.g. the reincarnation service).
- jspthrowaway2 14y agoMany of your ideas sound like they come from inexperience with writing operating systems. That's not your fault, and rather than attack all of them and sound like an extreme poopoohead I'll point out the one that made me wince the most: IPv6 for IPC gains you nothing except preference, and carries with it extreme overhead for forming Internet packets to do a simple syscall. That choice alone would probably cut performance by an order of magnitude at the least. You still have to make an IPC protocol on top of IPv6, since IPv6 is just transport; you would end up with the same situation you decry (some things speak DBus over IPv6, others speak ..., etc.) The 'I' in IPv6 stands for 'Internet'. Let's leave it there.
- alanctgardner2 14y agoReplacing pipes with IPv6 sounds like a recipe for disaster. It may be distasteful, but the ease of forking processes and communicating between them in C on UNIX has been very useful to me. I haven't even bothered looking into DBus, etc. because they're overkill for my requirements. Providing only one, complicated way to do something is not great, especially when simple alternatives exist. P.S. I'm not sure if your proposal rewrites 'pipes' in the shell as well - the overhead in a one-liner would be awful.
- chelmuth 14y agoFrom my understanding of your paragraphs about "privilege model" and "file systems", Genode is a candidate you may have a look at: http://genode.org/documentation/general-overview/ http://genode.org/documentation/general-overview/