LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Beginning Kernel Programming -- where to start? (https://www.linuxquestions.org/questions/programming-9/beginning-kernel-programming-where-to-start-375996/)

koodoo 10-23-2005 07:20 AM

Beginning Kernel Programming -- where to start?
 
Hi,

I am a Computer Science student. I would like to begin kernel programming. I am stuck as where to start. I did some research and found one guide and a tutorial at tldp
1) The linux kernel modules programming guide and,
2) The Linux kernel

Now I am not sure if these are proper to start with. I know C and have done some programming on the Linux platform but nothing related to the kernel. I know that kernel programming is no child's play, it requires considerable knowledge. I do not say that I have all the required knowledge, but I am ready to learn.
I would like to have your valuable suggestions on how/where to start, any good books/tutorials, or any other relevant information.
Thanks in anticipation.

georgekjolly 10-23-2005 07:43 AM

kernal programming
 
hi koodoo

I would like to introduce u a guy who is proficient in kernal programming .His email id is
<zacharia@focuzinfotech.com>

Andrew Benton 10-23-2005 07:48 AM

I would suggest that there are no short cuts. If you want to learn about kernel hacking, download the kernel source and start reading the code

btmiller 10-23-2005 11:59 AM

I would also suggest Linux Kernel Development by Robert Love as a pretty good introduction. The book Linux Device Drivers is also available online free courtesy of O'Reilly and the authors. I've not gotten very far into it, but in covering drivers it touches on a lot of other areas of the kernel. The Bovet and Cesati book Understanding the Linux Kernel is good and covers some stuiff that Love's book (at least the 1st ed., I don't have the 2nd ed. yet) doesn't, but it's based on the 2.4 kernel, not the 2.6. I imagine it will be updated at some point, but I'm not usre when.

Also, it's nice to get a comparative look at other *nix systems -- I've found Vahalia's Unix Internals, the New Frontiers good. For perspectives on a totally different OS, try Windows Internals plublished by (you guessed it) Microsoft Press.

Also, as was said, the only realy way to get good is to write code. Books will get you in the door, but you need to study and work with the code to make things happen.Sadly I don't have much time to do this myself. Also, if your college has an OS course, definitely take it. If not, consider investing in a beginning OS text such as Tanenbaum or the dinosaur book. This will help you come to grips with some of the terminology.

jtshaw 10-23-2005 08:08 PM

The books btmiller recommended are all very good.

As far as downloading and looking through the code. The kernel can be daunting. There are millions of lines of code. The best way to go about learning the kernel is to take it in small chunks. Some things are more difficult then others (I had a hard time getting my mind around the memory management myself) and some are easier (scheduling for instance, is a pretty brilliant and simple piece of code).

The Linux Cross-Reference is a great site for looking through the code and finding things.

koodoo 10-24-2005 07:38 AM

Thanks
 
Hi,

Thanks for your replies. I greatly appreciate your help.
Yes, I agree with Jtshaw as far as taking it in small chunks coz I don't feel confident that I can get started by just looking at the code. It seems to be quite daunting (at least to me).
Having said this I am not saying that I am looking for shortcuts, ya I know in the end it would be the actual code that I'll have to deal with, but I need a good book to get started.
One problem that I am facing is that at my place such books are not readily available and so I have to first request the local booksellers to get those books for me and then wait for sometime until they arrive. Meanwhile I am looking for some good stuff which I can find free on the internet. I have got the book Linux Device Drivers as it is available free on the net. I've also downloaded Kernel Hacking HOWTO and The Linux Kernel Hacker's Guide.
Okay so now I'll go to the local bookstore and ask if he can get me some of the books you've mentioned, until then I'll have to start off with the one's I've downloaded.

Thanks Btmiller for your suggestions on taking an OS course. Yes, I've already taken that and have read The Dinosaur Book
Any more suggestions/help is greatly appreciated.
Thanks again

RipClaw 10-24-2005 07:53 AM

I would very very much suggest you to learn about how the hardware works, along with your kernel studies. Once you gain knowledge about hardware & signals, writing a kernel should be a walk in the park;) .Optimization skills won't hurt too.

There are a bunch of architecture books from Mindshare. Read them and I bet you become the king :cool:
See the pics of them here

koodoo 11-17-2005 01:08 PM

Hi, thanks for the pointers you all provided. I ordered my copy of Linux Kernel Development (2nd edition) by Robert Love and finally got the book (after quite sometime, I must say). I'm finding the book quite interesting. The style of the author is also quite good.
I'll need help as I move along in Kernel Programming and I look forward to you all and these forums
Thanks again.


All times are GMT -5. The time now is 09:18 PM.