Vikidia currently has 3,463 articles. Improve it!

Join Vikidia: create your account now and improve it!

Kernel (computer science)

From Vikidia, the encyclopedia for 8 to 13-year-old children that everybody can make better
Jump to: navigation, search
Shows the job of a kernel in a computer

A kernel is the central part of an operating system. It manages the tasks of the computer and the hardware - most notably memory and CPU time.

There are two types of kernels:

  • A microkernel, which only contains basic functionality;
  • A monolithic kernel, which contains many drivers.

A computer user never interacts directly with the kernel. It runs behind the scenes and cannot be seen, except for the text logs that it prints.

The role of the kernel[edit | edit source]

The kernel is the most fundamental part of an operating system. It can be thought of as the program which controls all other programs on the computer. It is responsible for the creation and destruction of memory space which allows software to run. It provides services so that programs can request the use of the network driver, the disk or any other piece of hardware (the kernel forwards that request to special programs called drivers which control the hardware), manages the file system and sets interrupts for the CPU to enable multitasking. Many kernels are also responsible for ensuring that faulty programs do not interfere with the operation of others, by denying access to memory that has not been allocated to them and restricting the amount of CPU time they can consume.

Micro- and monolithic kernels[edit | edit source]

Operating systems commonly use Monolithic kernels. In Linux for example, drivers are often implemented as part of a kernel (specifically Loadable Kernel Modules). When a device is needed, its extension is loaded and 'joined' onto the kernel - in other words making the kernel larger. Monolithic kernels are problematic in that if one of these device drivers is faulty (such as if a beta graphics driver is downloaded) then because it is part of the kernel it often overrides the mechanisms put in place to deal with faulty programs (see above). This can mean that the kernel - and thus the entire computer - can cease to function. If there are too many devices, the kernel can also run out of memory - causing a system crash or making the computer very slow.

Microkernels are a way of solving this problem. In a microkernel operating system, the kernel deals only with critical activities - such as controlling the memory and CPU - and nothing else. Drivers and other functions that monolithic kernels would normally do within the kernel are moved outside the kernel, where they are under control. Instead of being an uncontrollable part of the kernel the beta driver is therefore no more unlikely to cause a crash as a beta web browser - that is, if a driver goes wrong it can simply be restarted by the kernel. Unfortunately, creating microkernel based operating systems is very difficult and there are no operating systems like these that are commonly used. Minix is a microkernel operating system.