3 ms·
Wow, this is awesome. I'm working on a design for a next-gen OS, and I already have some things that are in the article, like starting a blank process to be mu
by gavinhoward 3y ago
Wow, this is awesome.
I'm working on a design for a next-gen OS, and I already have some things that are in the article, like starting a blank process to be mutated before start [1], file descriptors as handles/capabilities, and such.
But there are some other things I don't have that I like.
For the bootstrap problem, I realized something that the author did: the better interface is generally more powerful:
> When requests and responses are paired 1-1, the asynchronous APIs offer perhaps performance improvements but no expressive power. When they are not 1-1, however, things get more interesting.
Then I realized that if an OS is designed right, it will generally have more expressive interfaces, and those expressive interfaces can then be used to implement the APIs from other operating systems.
So I intend to make a microkernel that implements the APIs for the popular operating systems. Then I will make a userspace driver shim that implements the Linux driver API.
Boom! Instant OS and driver availability. Done right, Linux drivers will work, and software from the major operating systems will work.
And then I will encourage people to use the better APIs when on my OS until everybody is on my OS.
Embrace, extend, extinguish, but in a good way! :)
Will it work? Oh, heavens no. But as some comments have said, experimentation is a good thing.
[1]: https://news.ycombinator.com/item?id=35681941 https://news.ycombinator.com/item?id=35681941
- ksjskskskkk 3y agobro is reinventing windowsNT/os2
- thecodedmessage 3y agoIf at first you don’t succeed with a big company’s resources, try again as a hobbyist!
- BirAdam 3y agoDefinitely more NT, but he’ll hopefully make better use of the “personalities” than Microsoft ever did. Also, NT is mostly just VMS. So much so, that DEC threatened litigation which resulted in Microsoft supporting Alpha for longer than they’d otherwise have cared for.
- Ericson2314 3y agoI have begun some work on Nix on Windows in part because I want to do some embrace/extend/minimize in the other direction.
- packetlost 3y agoAs much as I want something to replace Linux, I think the big selling point is the bottom end, all the driver and community support. That said, even Microsoft gave up trying to emulate Linux userspace
- bakul 3y agoMicrokernels + userspace drivers end up with too many context switches. This has been the main issue with microkernels. Then you add performance sensitive services in the "microkernel" and it stops being micro! Note that KeyKOS has a microkernel arch. but they called it "nanokernel" to distinguish from all the other fat "microkernels". They even prototyped a Unix service called "KeyNIX". See http://cap-lore.com/CapTheory/upenn/NanoKernel/NanoKernel.html http://cap-lore.com/CapTheory/upenn/NanoKernel/NanoKernel.ht...
- gavinhoward 3y agoA 400 cycle IPC doesn't seem too bad. [1] Also, I came up with an idea to get around that, something I call "hardware pipes." [2] [3] The idea is that the OS can map the same page(s) into both processes, and one process can write into the memory to send a message, while the other reads. Add another page for communication the other direction. You would use something like futexes for synchronization. Besides needing to wake up a process that went to sleep waiting, the OS should not have to be involved, so context switches are minimized at the cost of atomic instructions. Of course, it would be even better if there was hardware support for such shared memory pipes, but I think it could be done with what we have now. [1]: https://sel4.systems/About/Performance/home.pml https://sel4.systems/About/Performance/home.pml [2]: https://gavinhoward.com/2020/07/testing-the-feasibility-of-hardware-pipes/ https://gavinhoward.com/2020/07/testing-the-feasibility-of-h... [3]: https://gavinhoward.com/2020/12/testing-the-feasibility-of-hardware-pipes-2-exploring-designs/ https://gavinhoward.com/2020/12/testing-the-feasibility-of-h...
- bakul 3y agoYou may still have N crossings: user process -> uK -> fileserver -> uK [-> generic Disk driver -> uK] -> specific device driver -> ... and concurrently some thread/process scheduling has to happen as there may be many such things in flight at the same time. All this has been thought about for decades. I encourage you read KeyKOS related papers on Norm Hardy's site (link in my earlier response). seL4 is of course a very good uK but it still have not taken over the world (its niche is probably high security environments).