Results 1 to 6 of 6
Is it me or is the concept of kernel and kernel modules very difficult to grasp. If somebody's nice enough, please explain to me in laymen terms what exactly the ...
- 06-30-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 11
Kernel and Kernel Modules
Is it me or is the concept of kernel and kernel modules very difficult to grasp. If somebody's nice enough, please explain to me in laymen terms what exactly the kernel is, how kernel modules work, and why do most people build the'yre own custom kernels?
- 06-30-2008 #2
What the kernel is: it's the program that runs all your hardware - disks, keyboard, sound card, memory, the lot. It also does the supervisory tasks such as starting all the other programs, assigning resources to them, switching them in and out of the cpu, and cleaning up after them when they terminate.
In Windows, each piece of hardware has its own separate driver program and all of them are using the system buses at the same time; hence the frequent clashes and freezes. In Linux all the drivers are in the kernel and there are no clashes between them because the kernel always knows what it's doing.
But having drivers for every possible piece of hardware all incorporated in the kernel would make it ridiculously large and slow. So the Linux kernel is modular: there is a kind of basic kernel and then all the drivers and filesystem readers are compiled as modules which can be linked in when required.
People used to build their own kernels. Real geeks still do but a lot of us don't bother. The compiled ones that come with your distro are usually good enough."I'm just a little old lady; don't try to dazzle me with jargon!"
- 07-02-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
The kernel is "the core" of your OS. It's a term that's frequently used in Linux, but in fact, all the OS'es need a kernel in one or another form.
The kernel manages the resources: cpu, memory and i/o devices (that's basically everything). It's the first program that is started when you boot your OS (if you except the bootloaders and the bios firmware, which is on a previous stage).
Linux has had traditionally a monolithic kernel, which means that all the drivers and such was embedded into the same kernel, instead of being on separate modules (both things have advantages and disadvantages, that's for another discussion). Lately, the linux kernel has gained some modularity, and now with things like libusd and fuse you can even do drivers on userland (that's also for another discussion).
In simple words: the kernel is the foundation that's needed by all the rest of programs. It's the one which serves as a bridge between your machine and your software. It decides which program is going to run on a given time slice, and which will be the next one to take time (this is how you can emulate multitasking on a single cpu machine). It also decides how to assign memory to the rest of processes. The programs themselves do not know if they are taking ram or swap memory on a hard drive, or anything else. For they it's just "virtual memory". How that memory is handled, how it's assigned, and where it physically resides it's up to the kernel.
The kernel also manages i/o devices, which in fact, means any arbritrary peripheral.
Most distros comes with precompiled kernels, so, unless you need to do some tweaking for any special reason, you shouldn't need to build one.
In some other cases, for example, metadistros like Gentoo, you need to build your own one.
- 07-02-2008 #4"I'm just a little old lady; don't try to dazzle me with jargon!"
- 07-02-2008 #5
maybe this might help
Filesystem in Userspace - Wikipedia, the free encyclopedia
- 07-03-2008 #6"I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote
