
Leave your OS at home: the rise of library operating systems - matt_d
https://www.sigarch.org/leave-your-os-at-home-the-rise-of-library-operating-systems/
======
mwcampbell
The article says that in data center workloads, 15-20% of CPU cycles are spent
in the kernel. Contrast that with Brendan Gregg's statement (for Netflix
running on EC2): "Most microservices we have run hot in user-level
applications (think 99% user time), not the kernel, so it's difficult to find
large gains from the OS or kernel." [1] I wonder why the OP and Brendan had
such different observations.

[1]:
[https://news.ycombinator.com/item?id=13081465](https://news.ycombinator.com/item?id=13081465)

~~~
rtpg
Doesn't Brendan Gregg work on things like Illumos/SmartOS? I think it's
probably using lightweight OSs like that which help

Meanwhile most people just kinda take out of the box Ubuntu

~~~
brendangregg
I've primarily worked on Linux for 3+ years.

------
Artlav
Funny thing is, my old OS project [1] is more or less that - it could be a
typical OS with separate tasks and so on, but it is effectively a single
program, and can easily be compiled as a single program with all the standard
calls replaced with OS-level implementations.

In practice, these are two different sets of use cases - in one you want clean
abstractions, process separation, storing message passing and so on, in the
other you want to get the call from your code into the libservice ASAP. Trying
to (unwittingly) combine the two gave me quite a bit of grief.

Another disadvantage is a lack of any protection (at least in my
implementation), since everything shares the address space.

Anyway, it's odd to see that a random idea i had 17 years ago is actually
starting to get used.

[1] [http://orbides.org/aprom.php](http://orbides.org/aprom.php)

~~~
rwmj
Yours sounds like a Language-based Operating System, except you didn't
implement protection in the language. Anyway they've been around for a very
long time. The Burroughs system that I'm familiar with was around in the 1960s
(from 1961 according to Wikipedia).

[https://en.wikipedia.org/wiki/Language-
based_system](https://en.wikipedia.org/wiki/Language-based_system)

------
pishpash
Back to real mode we go.

~~~
gravypod
I guess we should have been listening to Terry all of this time!

~~~
throwaway7645
I really wish I could do a good bit of my work on his OS. I'd much rather a
Kawasaki than an aircraft carrier that is half sinking.

Charles Moore of Forth fame has an amazing interview where he argues that the
OS is really not necessary on modern hardware. Of course this man built his
own language, CAD software, and chips...some of which are in outer space.
Impressive man.

~~~
ioddly
Where is Chuck Moore now? He used to write a blog that was sometimes quite
educational.

~~~
fish_fan
I believe he's still with GreenArrays.

~~~
throwaway7645
He retired a week ago apparently.

------
cbetti
If I can offload work to the OS, great! I don't want to manage the virtual
memory backing my mmap when the kernel is really good at it. It is not
inherently bad when CPU time is spent in the kernel.

The point I'm taking away from this article is that some workloads (probably
not mmap) trigger bottlenecks in the kernel, and would benefit if it were
possible to replace those kernel components via app library.

That said, we do things like this all the time today. For example, I can
provide my own memory allocation library instead of depending on the one
provided by the operating system.

So I'm unconvinced there are many real world bottlenecks without a descent
solution available today.

I wonder: Is the real point that leveraging custom implementations is hard and
we could all benefit from a nice central repository and a reasonable
dependency manager?

------
Animats
Well, having an entire copy of Linux in a container is a bit much.

~~~
mgraczyk
This seems like a trade-off we're already okay with making.

    
    
        $ du -h /boot/vmlinuz-4.4.0-93-generic 
        6.8M    /boot/vmlinuz-4.4.0-93-generic
        $ du -h /usr/bin/docker
        12M     /usr/bin/docker

~~~
skrebbel
I think you're misunderstanding what GP means by "linux" on purpose.

~~~
orbat
And conveniently forgetting that docker is written in Go, so the binary also
has the runtime and all used libraries baked in

------
bluedino
I thought this was going to be about things like Dynix

------
known
I'm currently using [https://askubuntu.com/questions/138356/how-do-i-get-a-
live-u...](https://askubuntu.com/questions/138356/how-do-i-get-a-live-usb-to-
use-a-partition-for-persistence) and really like it

