Beginner guide

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Wed Jun 11 13:55:02 EDT 2014


On Wed, 11 Jun 2014 11:58:02 +0530, Prudhvee Narasimha Sadha said:

>      I just want to know what I should learn and any suggested books to
> learn kernel programming.

Learn C.  Learn C *really* well.  Especially the way the Linux kernel
implements object-oriented concepts using callbacks through structures
of function pointers (struct file_ops, etc...)

Learn about race conditions and locking.

Come to grips with the fact that the Linux kernel of 2014 isn't the kernel
from 2004 - most of the code has already been looked over by lots of
professional programmers, and a lot of the low-hanging fruit has been
cleared out already.  So be prepared to accept that these days, not
everybody can be a productive kernel hacker.

However, Greg KH is *always* willing to accept any coding love you want
to give to anything in drivers/staging :)

Two very helpful book, even though they are *not* about Linux:

Maurice Bach - The Design of the Unix Operating System

McKusick - The Design and Implementation of the FreeBSD Operating System

Why? It's useful to understand different solutions for how to represent things
like processes, files, and devices.  And both books are an excellent way to
learn about locking in the context of OS design, as they spend a *lot* of time
on "We need to lock this data structure from this point in time until this
other thing finishes, because otherwise something else could run here and do
this other perfectly reasonable thing at just the wrong time, which would
unfortunately end up turning your entire filesystem into a steaming pile of
dingo kidneys because such-and-such will get trashed..."

And if you're bored, Elliot Organick's "The Multics System: An Examination of
its Structure" (ISBN 0-262-15012-3) has insights to be understood, 40 years
after it came out....

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140611/cf7dc7f1/attachment.bin 


More information about the Kernelnewbies mailing list