LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-25-2007, 02:15 PM   #1
SamJz
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
How to study the linux source code?


Hi,

I am a newbie to linux and OS. I just downloaded the source code of linux-2.6.23 online. I want to study the source code to learn the concept of OS kernel. Anybody knows any resource online that can guide me to understand linux kernel source code?

Thanks a lot,

Sam
 
Old 10-25-2007, 02:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well no... you'll not be able to understand the kernel by reading it. the kernel contains well well over a million lines of code, most of which is highly optimized and uncommented to any huge extent. there are plenty of guides about writing your own kernel, e.g. http://www.osdever.net/tutorials/bas....php?the_id=12 and there are guides about the linux kernel, e.g. http://kernelbook.sourceforge.net/pkbook.html but prinring out the source code over 6 trees worth of paper and sitting down with a lot of coffee isn't going to help you.

Last edited by acid_kewpie; 10-25-2007 at 02:36 PM.
 
Old 10-25-2007, 02:52 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
http://kernelnewbies.org/
 
Old 10-25-2007, 03:00 PM   #4
SamJz
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your reply. I know it is hard for me to master the entire kernel source code in a short time (or never). But I have read quite a few books talking about OS, and I am kind of reaching a bottleneck of getting any further. So I decide to deep into the linux kernel source code a little bit as an example to get a concrete feeling about how the process scheduling and memory management stuffs are implemented inside the OS. I just wondering whether there are any documentations online that give direct explanation to the source code in any degree of detail. I think it is wise to ask you guys as experienced programmer about some guideline. Thanks again.
 
Old 10-25-2007, 03:59 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Who said we were experienced programmers? Most of us probably could not program our way out of the proverbial wet paper bag.
Knowing how to set up and maintain systems is a far cry from knowing how to design them.....

Have you read this book?
Also, check out the O'Reilly website.
 
Old 10-25-2007, 05:37 PM   #6
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Thumbs up

Quote:
Originally Posted by pixellany View Post
Have you read this book?
Also, check out the O'Reilly website.
You can also get that book for no cost from the author's website by the way.
 
Old 10-25-2007, 08:29 PM   #7
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
One of the best ways to learn about the kernel is to write a device driver that plugs into the kernel. To do a thorough job of this will have you wandering through an awful lot of the kernel's system structures.

Further, at the end of the journey, you'll have something useful - and who knows? - it might actually wind up in the kernel tree.

And yes, I do kernel programming and that is how I learned the Linux kernel. Unfortunately, my clients won't permit me to release the code under the GPL, and since they pay the bills...
 
Old 10-25-2007, 09:03 PM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Have you read a book about operating systems in general? There are two excellent ones that I own "Operating Systems" by Bill Stallings and "Operating Systems Concepts" by Silbershatz, Galvin and Gange.

These books go into the theory of process control, memory management, file systems, etc. That way, you have a good grounding in Operating System Theory, and then you can look at the Linux source and see what you have been learning about.

--Ian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: EU study says open source could increase competitiveness LXer Syndicated Linux News 0 01-15-2007 06:21 PM
LXer: Study: 40% of Irish companies choose open-source LXer Syndicated Linux News 0 01-14-2006 09:16 AM
Linux source-code tejprakash_kolla Linux - General 2 10-29-2005 04:54 PM
Get Source Code for Linux seventhsense Linux - Software 6 07-12-2005 04:44 AM
where i will get the source code of Linux?? and ... nazib Linux - General 1 02-16-2005 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration