Pick a Free OS

How to roll your own Linux

ZDNet LogoTime was when after writing their own device driver program, boys fancied they

had grown up into men. Till Linus Torvalds came along and made them feel rather

puny. Torvalds set out to write an entire kernel and the results, if one were

to go by the cult following Linux still commands, were quite spectacular!

So what's a kernel? Here's how the Linux Kernel How-To describes it:

"The Unix kernel acts as a mediator for your programs and your hardware. First, it does (or arranges for) the memory management for all of the running

programs (processes), and makes sure that they all get a fair (or unfair, if

you please) share of the processor's cycles. In addition, it provides a nice,

fairly portable interface for programs to talk to your hardware."

A kernel is simply the piece of code that builds the base on which a whole

OS can be designed. Applications must go through the kernel to perform tasks

and use processing power, memory, devices and disk access. This makes the kernel

the most important part of a Unix system.

Linux became the most popular of the Unix systems because it was open-sourced.

Everyone could get the Linux source code and use, modify and customize it--to

be recompiled to suit individual needs. And these were all for free! So, hordes

of people pitched in to develop the Linux kernel, helping the OS incorporate

many new features and device drivers. The Linux kernel now supports thousands

of devices. And the number is increasing every day.

With support for so many devices, the kernel's performance is bound to take

a beating. If not properly implemented, the kernel can add to the size of the

code and end up consuming more memory in loading unnecessary drivers.

That's how the idea of kernel modules came from. Kernel modules are small attachments

to the base kernel which allow it to incorporate support for many devices, without

programming them straight into the kernel. This helps the kernel remain compact

and still be customizable to support many devices.

The default kernels bundled with many Linux distributions are neither optimized,

nor do they support SCSI emulation that's needed for CD writing while using

a non-SCSI CD Writer. Instead, they include support for many common devices