On Fri, Jan 17, 2020 at 8:24 AM Larry McVoy <lm@mcvoy.com> wrote:
On Fri, Jan 17, 2020 at 09:50:24AM -0500, Clem Cole wrote:
> 6th Edition is clear and if you want to understand what it takes and how it
> works, John's commentary it difficult to beat.

It's a good starting point but it's pretty outdated.  I like to go on and
on about how much I love the SunOS 4.x kernel but it is outdated as well.

I wish there was a v6/SunOS like kernel that was as clean but had good
support for SMP and NUMA and TCP offload (and probably a long list of
other useful stuff I've forgotten).

Teaching kids how a single threaded kernel works is cool but it's
also misleading, the world has gotten a lot more complex.  And while
the kernels of decades ago were clean and simple, I don't know of
a kernel to point people to that has the clean code that SunOS had.
Solaris isn't it, though it has some bright spots.  Linux is meh, it's
better than nothing by a lot but I would not point to it as "read this,
kid, you'll see the architecture".  It's not clear there is a good
answer.

It's but the first step on the road to understanding. I'd been working on the FreeBSD kernel for years when I re-read the Lions book. The stark simplicity of the v6 kernel helped everything suddenly 'click' into place in the code I was reading in the FreeBSD kernel, even with 30ish years of changes to the v6 code base that lead to the FreeBSD kernel...

Newer systems are a lot more complicated. And they need to be to get the full performance out of the system. Yet understanding the basics without the extra clutter has great value.

Warner