Subject: Re: Kernel Hacker want-a-be.
To: John A. Maier <johnam@kemper.org>
From: Chuck McManis <cmcmanis@mcmanis.com>
List: netbsd-ports
Date: 04/17/2000 09:08:33
Read the daemon book (Design of the 4.4 BSD system), and perhaps Bach's 
book on UNIX. Then write a character I/O driver to talk to something you 
can watch (my favorite is a parallel port that has lights or something 
hooked up to it.). Then read through the disk driver code and get a feel 
for how blocks are managed. That will lead you first to the file system 
code and then on to the VM system. Go through the VM system and lose many 
hairs (usually by your own hand :-) Try to see how UNIX controls access to 
memory and shares it with proceses. That will move you to the process 
manager and from there it is a very short hop to the scheduler. Hack the 
scheduler so that processes with your UID get preference for more CPU time 
:-) Observe how that interferes with the I/O subsystem getting its 
interrupts and working properly. Figure out interrupts and you'll have come 
full circle back into the I/O subsystem. You're now an apprentice kernel 
hacker. Fix bugs for five years and port changes from other systems (Linux, 
FreeBSD, etc) into NetBSD. Then you graduate. :-)

--Chuck

At 09:08 AM 4/17/00 -0500, John A. Maier wrote:
>Okay, I'm feeling kind of cocky, I'd like to dig into some kernel
>programming.
>
>I've got good asm skills (on the Z80, 680x and 6502, but the 32bit stuff
>doesn't look too different) and my C isn't half bad.  The kernel source
>is so large; it's hard to figure out where to start.  I have a basic
>understand how the NetBSD tree is laid out, but the interactions are so
>hard to follow; without some sort of a map.
>
>What would be a good source on breaking ground into this area?  How did
>others get started?
>
>jam