Subject: Re: Kernel Hacker want-a-be.
To: Ben Harris <bjh21@cam.ac.uk>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-ports
Date: 04/17/2000 12:52:02
>>it's wildly different.  there are things that go on in the kernel that
>>are wildly different from anything that goes on anywhere else in the
>>system: vm management, networking, file system layout strategy and
>>allocation, auto-configuration...things i don't yet understand at all.
>>not that i know how to write a compiler either, but...
>
>Those are just because the kernel does a different job to most userland
>programs.  If you looked at the insides of a serious database, you'd
>probably find they did the same kinds of thing.

yes, very true.  some programs are complex in their own way (like
optimizing compilers), but i still believe that the kernel is it's own
form of complexity.

>To my mind, the interesting thing about the kernel is that it's much like
>writing for a different system.  You're still writing in C, but what looks
>like pre-emptive multitasking from above suddenly turns out to be
>co-operative, and virtual memory turns out to be all too real.  Half your
>friends from libc (like malloc() and free()) turn out to have different
>arguments, too.

and null pointers give you a "different kind" of core dump.  :)

>As for how to get to know the kernel, try porting it to new hardware.  The
>past few months has taught me more about how the kernel works than any
>amount of source browsing could have.  Writing new device drivers for an
>existing port is a good way to get started, but spares you the really _fun_
>bits of kernel programming.  Understanding fork() and exit() from the inside
>is a rather mind-bending experience.

this is something that i *wish* i had the time and expertise to do.
oh...and the hardware.  i know there are plenty of platforms left out
there...i just don't have any of them.  :)

one thing that would be "helpful" in generic porting efforts would be
a list of the things (functions, macros, defines and constants, etc)
that the md code actually provides.  is there such a list somewhere?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."