The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Kevin Bowling <kevin.bowling@kev009.com>
To: Larry McVoy <lm@mcvoy.com>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: Clever code (was Re: Re: Stdin Redirect in Cu History/Alternatives?
Date: Sun, 11 Dec 2022 22:00:22 -0700	[thread overview]
Message-ID: <CAK7dMtDwZoTfNp42bQyH58b9NVVh6sCkLU=MfrEq6cFSpOUj2w@mail.gmail.com> (raw)
In-Reply-To: <20221212033453.GE8801@mcvoy.com>

On Sun, Dec 11, 2022 at 8:35 PM Larry McVoy <lm@mcvoy.com> wrote:
>
> On Sun, Dec 11, 2022 at 08:09:32PM -0700, Andrew Warkentin wrote:
> > On 12/11/22, Bakul Shah <bakul@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).
>
> I was friends with one of the 3 people who were allowed to commit to QNX
> kernel, Dan Hildebrandt (RIP 1998).  Those 3 people actually understood
> the "micro" in "microkernel".   Early versions of QNX kernel fit in
> the 4K instruction cache and left space for user programs.  They had
> benchmarks that measured cache misses and refused commits that added to
> the number of cache misses.
>
> I met Dan because I had 10 terminals on a 80286 with I think 256KB
> of memory and we were all editing and compiling and it worked way the
> heck better than a 11/780 with 4MB with 30-40 students trying to do the
> same thing.  I just wanted to talk to the people who made that possible,
> it was after I had made a connection to Dennis.  The early QNX people
> were special.  Dan and I had many conversations about the mono kernel
> vs micro kernel, it was super fun because we weren't trying to convince
> each other, we were comparing approaches.
>
> I've never seen a team like Dan's team that cared as much as they did
> about "micro" actually being micro.  That's the only way that that
> approach works.  I can not state that enough, if you want to have a
> micro kernel with message passing, if you don't fit in L1 cache,
> you are a joke compared to a mono kernel.  You have to embrace
> micro.
>
> I had hoped that Mach would be like that but it was a giant mess.  I know
> my opinion is not liked but I so wanted to like Mach, read the papers,
> loved it, then read the code, hated it, a few years ago I was working
> with the BSD team at Netflix, looked through the VM system from Mach
> and it was a mess, it was the exact opposite of my experience at Sun
> where I looked and looked and things came in focus and it made sense.
> The Mach stuff has never made sense to me, I know Clem says it was a
> research platform, OK, but the platform never got to a nice clean place.

Mach seems not incompatible to me to Windows NT ideas of layering,
especially in modern macOS guise, more so than a microkernel I'd call
it something like a "macrokernel" with a variety of ways to do
things.. dealer's choice for better and worse.  It is interesting to
note the success, often overlooked by more hardline *nix people, that
macOS (and iOS and tvOS and watchOS etc) is indeed mach (more so than
it is BSD as some people claim) and wildly successful.

> If you think of microkernels and think Mach is it, nope, look at QNX.
> --
> ---
> Larry McVoy           Retired to fishing          http://www.mcvoy.com/lm/boat

  reply	other threads:[~2022-12-12  5:01 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-10 19:38 [TUHS] " segaloco via TUHS
2022-12-11  0:22 ` [TUHS] " Clem Cole
2022-12-11  2:37   ` segaloco via TUHS
2022-12-11 13:59   ` Michael Kjörling
2022-12-11 14:28     ` Steve Nickolas
2022-12-11 15:04       ` Dan Cross
2022-12-13  1:54         ` Larry McVoy
2022-12-11 17:18     ` Adam Thornton
2022-12-11 18:54       ` Michael Kjörling
2022-12-11 19:55         ` Dave Horsfall
2022-12-11 20:03           ` Larry McVoy
2022-12-11 23:22             ` segaloco via TUHS
2022-12-12  2:15             ` [TUHS] Clever code (was " Bakul Shah
2022-12-12  2:44               ` [TUHS] " Steve Nickolas
2022-12-12  3:09               ` Andrew Warkentin
2022-12-12  3:34                 ` Larry McVoy
2022-12-12  5:00                   ` Kevin Bowling [this message]
2022-12-12  5:26                   ` Andrew Warkentin
2022-12-12 15:02                     ` Larry McVoy
2022-12-12 15:29                     ` Clem Cole
2022-12-12 15:39                       ` Dan Cross
2022-12-12 16:04                       ` Larry McVoy
2022-12-12 16:26                         ` Clem Cole
2022-12-12 22:20                         ` Liam Proven
2022-12-12 23:10                           ` segaloco via TUHS
2022-12-12 23:24                             ` Larry McVoy
2022-12-13  2:00                       ` Andrew Warkentin
2022-12-13 13:37                         ` Larry McVoy
2022-12-13 23:00                           ` Andrew Warkentin
2022-12-14  1:05                             ` Larry McVoy
2022-12-14  1:40                               ` segaloco via TUHS
2022-12-14  6:32                                 ` Rich Morin
2022-12-14  2:01                               ` Andrew Warkentin
2022-12-14  7:49                                 ` arnold
2022-12-14 11:54                                   ` Brad Spencer
2022-12-14 12:08                                     ` [TUHS] Re: (TUHS -> COFF?) Re: Clever code Michael Kjörling
2022-12-14 15:14                                     ` [TUHS] Microware's OS-9 (was: Clever code) G. Branden Robinson
2022-12-14 22:41                                       ` [TUHS] " John Cowan
2022-12-14  9:46                               ` [TUHS] Re: Clever code (was Re: Re: Stdin Redirect in Cu History/Alternatives? Harald Arnesen
2022-12-15 18:33                                 ` Liam Proven
2022-12-16 10:42                                   ` Harald Arnesen
2022-12-18 14:05                                     ` Liam Proven
2022-12-18 15:08                                       ` Stuff Received
2022-12-19 11:47                                         ` Liam Proven
2022-12-20  8:30                                       ` Andrew Warkentin
2022-12-20 11:57                                         ` Liam Proven
2022-12-15  0:29                 ` Bakul Shah
2022-12-15  2:54                   ` Larry McVoy
2022-12-15  5:36                     ` Bakul Shah
2022-12-15 14:02                       ` Dan Cross
2022-12-15 14:06                         ` Larry McVoy
2022-12-15 14:18                           ` Dan Cross
2022-12-15 14:02                       ` Larry McVoy
2022-12-15  8:01                     ` Andrew Warkentin
2022-12-12  9:48               ` [TUHS] Re: Clever code Michael Kjörling
2022-12-12 21:34             ` [TUHS] Re: Stdin Redirect in Cu History/Alternatives? Dave Horsfall
2022-12-12 21:46               ` Chet Ramey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7dMtDwZoTfNp42bQyH58b9NVVh6sCkLU=MfrEq6cFSpOUj2w@mail.gmail.com' \
    --to=kevin.bowling@kev009.com \
    --cc=lm@mcvoy.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).