Saturday, May 8, 2010

Short-cut to the Linux kernel

These days, I begin collecting some Linux documents and information on blogs and twitter, so I can easily keep track of the information, and build up a knowledge base for later reference.

The Linux Kernel tar bar is pretty easy to obtain, compile and use. First time I did it was 10 years ago but never got a chance to seriously understand the Kernel itself, until Linux 2.6 has been out for a while, and popularly used everywhere from desktops to embedded systems. The article ( appears just too exciting to me with easy-to-understand discussions on so many advances in the new kernel in areas including O(1) scheduling, memory management, fast threading and mutexing. The author of many new updates in the new kernel, Ingo Molnar, bragged honestly in a KernelTrap interview that he started installing Linux around 1995 to see how to write a kernel, then became an Admin, and then a Linux user.

I started knowing Linux in the 90's too when someone in college compiled a system from source. I became the Admin of the system and a frequent user. When I finally got motivated to look at the kernel source -- it is already a huge tar ball (>64MiB in bz2 format)... Too much. I then googled the tar ball for Linux 0.11 written by Linus Torvalds himself for i386. Yep, this is a palatable 79K small tree, though it's enough to read for a couple of days or so. I think it may be the easiest way to understand the internals of the early Linux kernel -- boot, fs, devs, procs, etc. w/o headache.

The following are some links about the short-cut of understanding the Linux Kernel from its birth.

Linux 0.11 source:
i386 IDT:
Protected mode and paging:
How to write an OS:
An interesting experiment of using int 0x81 instead of 0x80 for syscall:

No comments:

Post a Comment