I find the linux kernel source very cryptic. I can see that there are many abstractions in it. I go through the source daily finding stuff that i can understand. But in any source file i find macros and functions that have not been declared in that same file. It is an advantage to keep all commonly required macros and functions in a single header file. But i have to open 10 different files to trace all the unknown macros/functions.
I have heard people say that it is easy to understand linux kernel source. What is so easy about it. I am interested in understanding the linux kernel and would like to know whether my method of trying to understand the code is bad. What can i do to understand the kernel?
Linux Kernel Source
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India
I'm pretty sure that the newest versions of the kernel are not that easy to understand. (There are even several books on the subject.) When they say "it's easy to understand", I think they might mean an earlier version. (0.01, 0.02, 0.91, etc.) Which are a little easier to understand.
C8H10N4O2 | #446691 | Trust the nodes.
When they say that "it's easy to understand", then you should ask back "then, how does [some code in some file/s] get to [do such thing]?".
Or "then, how do I get to understand macros that are spread among so many files?"
If they give some valious pointers that actually make you advance, then you can say that they are being sincere when they say it's easy and takes up some more knowledge; but if they tell you "it's easy but I have no time at all" and not even give you an extremely brief practical pointer, then it's most likely that either they are playing with you or don't want to share.
I firmly believe, and I think it's clearly visible, that the Linux kernel as well as virtually any other open source project has not been thought to be understood by newbies, but only best for those who live around its development. VERY probably they have done it to keep some exclusivity and have developed methods to make hard-to-read code but since they developed that programming style it's easy for them.
Even it it's made by millions of people, I don't see how it couldn't be more clearly code and do the same things or even better.
Keep making them the questions you post here to them, so you can have more chances to get valid answers from the true ones.
Or "then, how do I get to understand macros that are spread among so many files?"
If they give some valious pointers that actually make you advance, then you can say that they are being sincere when they say it's easy and takes up some more knowledge; but if they tell you "it's easy but I have no time at all" and not even give you an extremely brief practical pointer, then it's most likely that either they are playing with you or don't want to share.
I firmly believe, and I think it's clearly visible, that the Linux kernel as well as virtually any other open source project has not been thought to be understood by newbies, but only best for those who live around its development. VERY probably they have done it to keep some exclusivity and have developed methods to make hard-to-read code but since they developed that programming style it's easy for them.
Even it it's made by millions of people, I don't see how it couldn't be more clearly code and do the same things or even better.
Keep making them the questions you post here to them, so you can have more chances to get valid answers from the true ones.
You're entirely sure that they said linux and not minix ?salil_bhagurkar wrote:I have heard people say that it is easy to understand linux kernel source
Browsing the source online might help resolving the dependencies as links to other files are automatically providedmuisei wrote:Somewhere I'v read that you need a source code browser to read the code, but I can't remember the names of those browsers
regards,
gaf
- salil_bhagurkar
- Member
- Posts: 261
- Joined: Mon Feb 19, 2007 10:40 am
- Location: India