Hi,
When I added to these wiki pages my intent was not malicious in any way. Over the last month or more I've been watching new OS developers (those the wiki would be most useful for) in several messages boards. They tend to start with making the boot code load a kernel, then they build keyboard and basic video into this kernel, then add floppy and/or IDE/ATA hard drive code in, usually followed by FAT file system code and/or a CLI and/or a GUI. You see how this progresses? One huge binary containing everything without any forethought or planning.
My intention was (and may still be) to extend those wiki entries and then create a "What should I think about
before I start coding" page that promotes becoming familiar with both the tools and the architecture that the OS will use, and also references those pages (and some of the other pages on memory management, multi-tasking, etc) so that new developers think about what features their OS will have. It is an attempt to prevent the "I want to do brain surgery, how do I use a knife?" type questions and to encourage decent design and planning stages to the (typically very sloppy or completely lacking) design process that seems to me to be increasingly common.
I agree that "Building all device drivers into the kernel will (eventually) result in a huge kernel where most of it is unused." should be obvious, and definately is for most of the regulars here, but most of the regulars here don't have any need for the wiki pages on kernel types. For the people that do need these wiki pages I don't think the statement
is obvious.
In this way code can be added or removed using conditional code, resulting in a kernel that is customized for the specific computer.
You can do the same without shipping as source and requiring recompiles.
Do you honestly believe this (for any type of kernel)? Think about removing all the "if(computer_supports_X) then <something> else <something else>" code. Consider PAE, global pages, FPU native exceptions, INVLPG, FXSAVE, etc, and processor specific optimizations (like "Is a series of ADD instructions faster than LEA?"), unrolling loops to the size of the L1/instruction trace cache, etc. This is just the CPU, there's the hardware side of things too - is it an 80486 without PCI, is it a newer computer without ISA, is there a USB bus, are there IO APICs, SMP, NUMA, etc. I guess it is possible - you'd just need to distribute thousands of pre-compiled kernels to do it.
The performance benefits of compiling code specifically for a certain computer aren't restricted to the kernel either - see the Gentoo project where people (including me) compile everything from the boot code up specifically for their computer in a (not necessarily sensible) attempt to squeeze every last cycle out of all code.
[message split due to size]