Simple question - complicated answers

Bart Silverstrim bsilver at chrononomicon.com
Fri Sep 28 12:57:26 UTC 2007


alex wrote:
> 
> Bart Silverstrim wrote:

> QUOTE:(from above) Then we'd know if the OP:  2) wants to know where
> the kernel is stored, and/or related kernel files.     3) wants to
> know how the kernel works, a la block diagrams
> 
> 
> 
> As for what I wanted to do --------I believe I clearly said that all
> I wanted to do is see what the kernel looked like.  I had no 
> intention of doing anything but study it.to get some idea of what it
>  did.   I still would like to examine the kernel.if this is possible.

The actual kernel that handles the operating system functions is a 
binary file.  If you were to look at it, you'd need to use a hex editor 
and it would resemble, if you don't dream in binary, complete and utter 
gibberish.  Just look at the file vmlinuz.

If you want to understand the kernel, first look for the definition of a 
kernel related to operating systems.

Second, look at a simple book on programming, so you can understand the 
process of writing source code, compiling, linking, and executing the 
final product.

The Linux kernel begins as source code; you can get it at the kernel.org 
site, I believe, although for Ubuntu you can use apt-get to install the 
kernel sources.  You'll get a directory filled with the Linux source 
code, enough to have you spend the next several months reading C and 
assembly code.  If you want to stress your system, you can make sure you 
have the compiler tools and compile the source code for fun.  The source 
is all text, and you can edit it, break it, alter it, etc.

After compiling, you get vmlinuz and modules that hook into it at 
runtime.  These files are machine code and execute at boot time.  You 
probably won't be able to directly read these files, and you really 
can't edit it without a hex editor, and quite frankly you don't WANT to 
edit those.

The kernel is like butterfly.  You can read the source...the 
caterpillar.  Compiling is when it's cocooned.  The butterfly is the 
finished binary.  If you want to "look" at it, you'll need the caterpillar.

For your average Joe Non-Programmer, you'd be better off probably 
looking at diagrams of subsystems that outline how, for example, the 
memory manager interacts with the VMM, and how the scheduler work, etc.

> What aroused my curiosity about the kernel was reading about it in
> the kernel websites..
> 
> Perhaps I'm a bit too old to to work Linux......I'm 89.

You're not too old.  It's just a matter of taking time to understand 
what you're getting into; it reminds me of people who can't tell the 
application Word from the document, the data, they create with Word, or 
that they're even running a word processor to do it (What did you use to 
make the letter?  Reply: "Microsoft"...).  Your questions are, as 
pointed out, showing a lack of understanding of what you're asking.  You 
end saying maybe you're too old to work Linux...work it as in use it? 
Administrate it?  Did you want to work with contributing to the kernel 
code?  Start programming in general as a hobby?

Take the advice others offered; get some material on how the programming 
process works, then look up the definition of an operating system 
kernel.  I've been using Linux for years, as well as NT, and played with 
several others and I still wouldn't know how to create an operating 
system so user applications can interact with the OS part.  But I use 
Linux just about every day at work and at home for everything from 
administrating remote systems to email to running testbeds and server 
images using VMWare.




More information about the ubuntu-users mailing list