[TUHS] Clever code (was Re: Re: Stdin Redirect in Cu History/Alternatives?

Andrew Warkentin andreww591 at gmail.com
Mon Dec 12 13:09:32 AEST 2022


On 12/11/22, Bakul Shah <bakul at iitbombay.org> wrote:
>
>
> Agree that clear code is preferable to complicated code. But in practice
> people sacrifice clarity for performance improvement all the time. Look
> at the kernel code of any modern os. Everybody pays lip service to this
> but most anything other than toy programs ends up getting needlessly
> complicated over time. As an example, building "Unix as a service" as
> user processes on top of a small microkernel could provide the same
> functionality using much clearer and much less code but it would be
> slower so we don't do it. Plan9 sort of went in that direction and it
> is much simpler (but that could also be because it is not hacked on so
> much).
>

It's not necessarily true that microkernels are significantly slower.
They mostly got that reputation because of Mach and kernels like it
with their heavyweight IPC. Lightweight microkernels like QNX and the
L4 family generally have significantly better performance (in fact,
QNX 4 outperformed SysV/386 back in the 90s on certain benchmarks, and
a proof-of-concept network driver on a current version of seL4 is
significantly faster than a Linux network driver).


More information about the TUHS mailing list