11 ms·
HelenOS: a microkernel-based, multiserver OS from scratch
- GekkePrutser 4y agoWow multiserver, so it would seamlessly distribute tasks to different servers? That's really cool if I understand it correctly.
- chillfox 4y agoTheir webpage has this to say about it in the FAQ, so I would say nope. "Within the scope of microkernel operating systems, a multiserver spreads the operating system functionality over multiple user processes. Note how this differs from a single-server microkernel that concentrates all these functions into a single user process." - http://www.helenos.org/wiki/FAQ http://www.helenos.org/wiki/FAQ
- krylon 4y agoIt's not about clustering, "multiserver" in this context means that parts that are stuffed together in the kernel on Linux or BSD run in separate userspace processes (i.e. networking, file system, device drivers, ...). This approach gives better isolation of those components, so a bug in one is less likely to affect others, and if one crashes, it can potentially be restarted, while the rest of the system keeps running. If done right, it can also make these individual parts simpler. GNU/Hurd tries the same, but with POSIX compatibility and so far with mixed success. Other multiserver microkernel systems I know off are Minix and QNX. I'm sure there's more.
- forgotpwd16 4y agoRedox, Fuchsia, Genode, Helios/Ares, are some more recent examples.
- mike_hearn 4y agoModern operating systems are all microkernel-ish to some extent. Linux can run filesystems in usermode processes, Windows does run the graphics subsystem in a separate process, macOS consists of tons of components running in various servers connected by Mach ports and is similar to Android in that they're moving drivers progressively out of the kernel into processes. The two classic examples of the networking stack and the filesystem generally don't move because they aren't buggy enough to be worthwhile, the performance hit is too great and because it's unreasonable to expect userland processes to cleanly handle a restart of things like that. Like, in 99.99% of real programs if every file descriptor is suddenly invalidated then that program will crash and the devs won't care if you report it as a bug because they'll say, yeah well, actually it's on you to fix your buggy OS not on us to code around it. Other platforms don't crash their network or FS driver every five minutes so why should we do extra work for yours? So the kernel vs microkernel distinction doesn't seem particularly relevant or interesting anymore, at least not to me.
- snvzz 4y ago>the performance hit is too great I see this myth referenced a lot due to misconceptions constructed around design issues in early, pre-Liedtke microkernels (particularly Mach, used in IOS/OSX) leaving a long-lasting impression. L4 changed everything, and seL4 takes it to the next level. Some references: - https://archive.ph/30hhi https://archive.ph/30hhi - https://youtu.be/INBEKSkAiTA?list=PLtoQeavghzr3atxNQig-sLGbwoKBSVxGV&t=870 https://youtu.be/INBEKSkAiTA?list=PLtoQeavghzr3atxNQig-sLGbw...
- snvzz 4y agoI add: https://sel4.systems/About/seL4-whitepaper.pdf https://sel4.systems/About/seL4-whitepaper.pdf
- pjmlp 4y agoThat is why Linux is run on top of hypervisors, alongside containers and kubernets orchestration engines, get to use that extra performance.
- snvzz 4y agoWith that extra insecurity due to huge TCB. The kernel is MLoCs of poorly structured, highly privileged code. A breeding field for bugs.
- still_grokking 4y ago> Modern operating systems are all microkernel-ish to some extent. This won't become true even it gets repeated more. A micro kernel requires a micro kernel design form the ground up. (Something like FDs would be only one example of something where you would need different APIs…) You can't make a micro kernel out of a monolith. That's one of the reasons something like Hurd failed, and something like macOS is a slow and buggy hell. The story about the graphics drivers on Windows is also not true, afik. I've heard they moved this back into kernel space (with some special encapsulation) long ago because it was way to slow otherwise. Because you can't move an existing design to be an micro kernel after the if your APIs are all designed for a monolith setting. Alone the fact that you need async "SysCalls" (or better said "ServerCalls") in a proper micro kernel design makes it impossible to make a micro kernel out of a monolith (where all SysCalls are usually sync, because it makes no sense to have an async layer for intra-process calls). Also micro kernels aren't slow. The canonical link was posted already in a sibling. The main point about micro kernels, and why they still more than matter, is not about bugs and crashes. The main point is about security. You can't have a secure monolith! The TCB would need to be way to large.
- mananaysiempre 4y agoNo. “Multiserver” (a term from the microkernel literature) means that the conventional basic OS services are split into several “server” processes with distinct responsibilities (a mounted filesystem, a network card, perhaps a hardware bus, etc.). This is the original conception of a microkernel- (as opposed to e.g. an exokernel-) style system and its architectural promise, although it’s not made necessary by the mere fact of being built on top of a microkernel: AFAIK L4Linux is a single server so the L4 microkernel basically acts as a simple VMM / HAL without further architectural benefits. (For other monolithic but userspace OS servers, look at wineserver in Linux, CSRSS and LXSS in Windows NT, etc. For multiserver systems of varying purity, look at QNX and Minix.) What you’re thinking of is a “distributed OS”, although those academic efforts look terribly naïve from today’s distributed consensus standpoint. Good points of entry may be Barrelfish and Plan 9.
- als0 4y agoAmoeba is a famous example of a distributed OS https://en.wikipedia.org/wiki/Amoeba_(operating_system) https://en.wikipedia.org/wiki/Amoeba_(operating_system)
- api 4y agoIt’s too bad this research didn’t continue. Instead we got a giant tower of kludges including containers, Kubernetes, service meshes, endless API design problems, endless reinventing of data serialization and protocols, and so on.
- deleted 4y ago[deleted]
- johnisgood 4y agoOr something like https://en.wikipedia.org/wiki/Sprite_(operating_system) https://en.wikipedia.org/wiki/Sprite_(operating_system) but with a microkernel!
- mananaysiempre 4y ago
- YPPH 4y agoRelated: HelenOS 0.8 - https://news.ycombinator.com/item?id=18833124 https://news.ycombinator.com/item?id=18833124 - Jan 2019 (55 comments) HelenOS: portable microkernel-based multiserver operating system - https://news.ycombinator.com/item?id=15046249 https://news.ycombinator.com/item?id=15046249 - Aug 2017 (67 comments)
- dang 4y agoThanks! also this one I guess: HelenOS GUI – experimental demonstration (2012) - https://news.ycombinator.com/item?id=12784350 https://news.ycombinator.com/item?id=12784350 - Oct 2016 (12 comments) p.s. nice formatting. (I want to add software to offer to inline HN links in this format when people include links to past threads in their comments.)
- still_grokking 4y agohttps://github.com/plibither8/refined-hacker-news https://github.com/plibither8/refined-hacker-news Install this and than look at the bottom of the page. :-D
- YPPH 4y agoThanks, doing it by hand is a little bit tedious, I gave some thought to knocking something together that input a group of ids/URLs and spat out a formatted comment (like, presumably, you have). But then this stopped me. https://xkcd.com/974 https://xkcd.com/974
- jiangplus 4y agoWhat does it mean by being multiserver here?
- nix23 4y agoLike Gnu Hurd or Minix3: https://www.gnu.org/software/hurd/ https://www.gnu.org/software/hurd/ >>It is a collection of servers that run on the Mach microkernel to implement file systems, network protocols, file access control, and other features that are implemented by the Unix kernel or similar kernels
- fulafel 4y agoSome microkernel based systems have more monolithic designs where there's one big "most of the os" server that might be derived from a BSD or Linux kernel and the microkernel's role is more like a hypervisor.
- johnisgood 4y agoIt is explained well on the Wikipedia page of MINIX 3[1]: > To achieve that, the code running in kernel must be minimal, with the file server, process server, and each device driver running as separate user-mode processes. Each driver is carefully monitored by a part of the system named the reincarnation server[2]. If a driver fails to respond to pings from this server, it is shut down and replaced by a fresh copy of the driver. In a monolithic system, a bug in a driver can easily crash the whole kernel. This is far less likely to occur in MINIX 3. [1] https://en.wikipedia.org/wiki/Minix_3 https://en.wikipedia.org/wiki/Minix_3 [2] https://en.wikipedia.org/wiki/Minix_3#Reincarnate_dead_or_sick_drivers https://en.wikipedia.org/wiki/Minix_3#Reincarnate_dead_or_si...
- robinsonb5 4y agoOh nice! Hopefully it'll receive a RISC-V port at some point.
- intc 4y ago> I ported the HelenOS kernel to RV64 in 2016, but I've never properly finished the user space support. I hope this board will be a good motivation for me to finally push the entire OS to the same level as x86-64 https://twitter.com/mdecky/status/1397892220225736711 https://twitter.com/mdecky/status/1397892220225736711
- bluepoint 4y agohttp://www.helenos.org/wiki/FAQ http://www.helenos.org/wiki/FAQ I find the FAQ to be more enlightening than this page. It explains what it is used for (OS research research in Charles University, Prague) and how it is different than other operating systems (genode, minix, hurd).
- dang 4y agoOk, we've changed the URL from https://github.com/HelenOS/helenos https://github.com/HelenOS/helenos to the project homepage. There's a link to the FAQ from there. Thanks!
- vitiral 4y agoReally cool stuff. It still uses GCC, which itself is several million lines of code. I wonder if they have a desire to port to something like QBE (~12k line backend) and cproc (~8k C frontend for QBE).
- nerdponx 4y agoI've never heard of QBE before. It seems like a competitor to LLVM, is that accurate?
- forgotpwd16 4y agoPrecisely. (Well competitors that can coexist.) There's a page on their site making a comparison: https://c9x.me/compile/doc/llvm.html https://c9x.me/compile/doc/llvm.html.
- eqvinox 4y agoWhy would/should it be attempting to replace the compiler?
- vitiral 4y agoIt seems like it's trying to simplify the tech stack, so I thought it might be something the author was interested in.
- forgotpwd16 4y agoNote that Helen is written in C++14. Currently there isn't a C++ front-end for QBE, let alone one supporting a recent standard. Writing one is not an easy task and one of essentially different domain.
- nerdponx 4y agoMaybe this is a silly question, but if people are building these from scratch as a hobby project, why don't we have GNU Hurd working yet? Is the problem nowadays that the goal has shifted from "make a kernel" to "make a kernel that's bug-for-bug compatibile with Linux including driver support"?
- pjmlp 4y agoBecause it isn't cool to work on Hurd, most likely.
- nix23 4y agoIt would be cool if they had a direction...aka let's build on mach...oh that's old let's make Hurd NG....wait even less people work on that one? ...ok let's get back to mach...and what do we do now? Having a kernel without goals is like a sandbox without having fun, no one cares.
- pjmlp 4y agoI missed that that, yeah.
- yjftsjthsd-h 4y agoI'm not an expert, but my understanding is that HURD made some uniquely poor choices that make it difficult to work with in ways that other microcernels don't necessarily suffer from.
- zasdffaa 4y agoBe helpful if you could elaborate on those choices
- nix23 4y agoHURD (mach) -> Hurd-NG -> back to HURD (mach): http://walfield.org/papers/200707-walfield-critique-of-the-GNU-Hurd.pdf http://walfield.org/papers/200707-walfield-critique-of-the-G... One step forward two steps back...and no actual progress, that kills a project who is in competition with something like linux (who is obviously not a perfect design but just pushes forward)
- goodpoint 4y agoPity it's not under GPL.
- snvzz 4y agoIt is BSD, which is GPL compatible.
- still_grokking 4y agoI've tried quite some alternative OSes in local qemu VMs. HelenOS was one of the few that actually worked. It feels very snappy. Seems also quite robust. I didn't manage to crash it just by playing around, like it's the cases with most other "toy OSes". One of the most "promising" OS projects out there, imho. (Promising in the sense that it seems to be at least a serous project with constant progress since many years already).
- dleslie 4y agoHow did it compare to, say, Serenity and Haiku?
- still_grokking 4y agoSerenity is still on the list of things I need to try out. Can't say anything about it at the moment. But I have to admit that regardless the hype around it I don't think that it's particularly interesting. I see it as just yet another Unix clone; with exactly zero innovation behind it. Even Redox, which I consider being a complete failure, tried some seemingly new concepts (and uses a micro kernel which makes it at least a little bit less "mainstream"). Haiku is rock solid. Very interesting project! But I would not put it in the basket with toy or research OSes, though. It's based on something that had even quite some commercial success. But yes, Haiku is definitely an "alternative OS". It would have been better if I worded this part differently, I guess, as I'm mostly interested in "experimental" OS architectures and less in "random" alternative OSes. (So, for example I've never tried to run TempleOS, or such things; also I didn't put much effort to run historic ones, when they where just Unix clones; there are quite some of these out there I guess). Haiku is much more complete than HelenOS of course. You can do all the basic computer things with it. It has quite some applications. I still remember the time when BeOS, its successor, was actually even much more usable in a GUI setting than Linux, which barely run X and some fvwm2 windows with terminal emulators—whereas BeOS had fancy multi-media players and 3D graphics at that time. Haiku has this apps still, but that's much less impressive today of course. Haiku is for example much more polished than say Hurd. There is a "working" Debian/Hurd version out there. But it was so buggy last time I've tried! Things were constantly crashing or not working at all. The last time I've tried to run Haiku I didn't find anything that was servery broken there. HelenOS feels comparable stable to Haiku. But there is almost nothing besides the bare OS. I think it had a kind of "packet manager" the last time I've tried but this didn't work well for me. Also there were almost no applications available. But that's not a bad sign as I think the most work goes into the OS as such. Which is good! The few things that were there on the surface were like I've said snappy and working without crashes. Which is imho already an achievement when compared with a lot of other OS projects (e.g. Redox, Hurd, unikernel / library-OSes, or just a "tuned" Linux build ;-)).
- sedatk 4y agoFirst thing I've noticed is the lack of a LICENSE file in the repository.
- fsckboy 4y agolicensing is addressed, though at a glance I don't quite understand it. I didn't read it in detail. http://www.helenos.org/wiki/License http://www.helenos.org/wiki/License
- nix23 4y ago>HelenOS is open source, free software. Its source code is available under the BSD license. Some third-party components are licensed under GPL. https://github.com/HelenOS/helenos#license https://github.com/HelenOS/helenos#license
- t43562 4y agoSymbian was multiserver and written in C++ - I cannot compare with HelenOS but the fact that there were separate server seemed to go hand in hand with asynchronous system calls which make Linux seem a bit primitive. I'm sure it caused a lot of problems in various ways too but I wasn't working on that at Symbian.
- ruslan 4y agoWhat are the minimum hardware requirements of HelenOS for ARM32 ? Can it be used on MMU-less MCUs like Cortex-M4 ?
- rubicks 4y agoCan I boot this from uefi? The qemu instructions don't mention ovmf.
- deleted 4y ago[deleted]
- puffoflogic 4y agoIt's fascinating how "everyone knows" that OSes "should" be written with microkernels and servers, but to a first approximation 100% of all general-purpose computing[0] is done on monolithic kernels. Are we hosts to an invasive meme with poor reality correlation, or are we victims of history holding us back from the right way to design systems? And how can we distinguish these, since both theories (by design) offer an explanation about how we might be deceived about the better solution? [0] Say, anything with a human input device and/or hardwired internet connection, to cover our bases but exclude IoT.
- mathverse 4y agoSun and then Oracle used to recruit people that worked on HelenOS for Solaris. Or that's how I remember the story but that was long time ago.