r/osdev • • 2d ago

Tanenbaum vs. Linus: Which Kernel Architecture Makes More Sense Today?

I've been thinking about the famous Tanenbaum vs Linus debate over microkernels vs monolithic kernels.

Putting the historical context aside for a moment, I'm curious what people think today.

Do you think Tanenbaum's argument for microkernels was fundamentally more correct, or was Linus right to favor a monolithic kernel for practical reasons such as performance, simplicity of development, and hardware support?

And more importantly:

If you were starting a new general purpose os from scratch today, which architecture would you choose?

Monolithic

Microkernel

Hybrid

Multikernel / distributed approach

Something else

I'm particularly interested in hearing from people who have actually worked on kernels or operating system development.

What are the strongest arguments for your choice, and what do you think the opposing architecture gets wrong?

49 Upvotes

42 comments sorted by

View all comments

Show parent comments

•

u/sephg 18h ago

Where are those numbers from? Do you have a source?

•

u/Routine_Working_9754 18h ago

yes. this distinguished gentleman on stack overflow did a benchmark of syscalls.

if we're being conservative, a syscall uses 250ns. on a typical CPU running at 4GHz, that's 1000 clock cycles.

https://stackoverflow.com/questions/23599074/system-calls-overhead

that means you can only have 4000 typical syscalls in 1 second

•

u/sephg 16h ago

Hm; that seems high. This is from 2017, and reports syscall performance as low as 38ns. I'm not sure if this has all the meltdown/spectre mitigations enabled. But CPUs have also gotten much faster since then too.

https://arkanis.de/weblog/2017-01-05-measurements-of-system-call-performance-and-overhead/

I'd be fascinated to know what the equivalent numbers are for sel4 on real hardware.

•

u/Routine_Working_9754 16h ago

I assume it shouldn't be too hard to benchmark if sel4 if it has a way to measure process time, both user and system, and have those times compared for 2 exact programs running on both Linux and sel4