Kernel is an English word used in computing to designate the operating system core, which is the main part of a computer.
A simple change of Kernel version to an older or more current one can be enough to solve problems of hardware and also computer compatibility.
With full control of everything related to the system, the Kernel is one of the first programs to be loaded at boot time. As soon as it starts to run, the Kernel starts a process that detects the entire hardware necessary for the computer to function properly.
In addition, a Kernel handles input and output requests from software, and manages, for example, memory and peripheral devices used.
Kernel Role
The Kernel, the core of the system, is responsible for connect the software to the hardware. In this way, it establishes an effective communication between the resources of the operating system and manages its functions.
See below the main functions of an operating system, managed by the Kernel.
process management
In an operating system, the process is a running program. The process management performed by the Kernel decides which processes will be executed.
Each of the running processes can enter and exit the processor several times in the same second, giving way to another process. The Kernel is responsible for deciding which processes will be allocated on the processor.
Since switching between processes occurs very quickly, a program can continue to run even if it is not on the processor.
Access modes
The execution of a process can be carried out in two different ways.
- user mode: consists of several subsystems. One of them, including the environmental subsystem, runs applications designed for different types of operating systems. User mode is considered an unprivileged mode. All the softwares in this way they must make requests to the Kernel in order to execute privileged instructions, such as creating processes.
- Kernel Mode: is considered privileged as it has access to the entire computer. When the CPU is in Kernel mode, it indicates that it is running a software trustworthy and able to carry out any instructions.
See also the meaning of CPU.
memory management
In the task manager, a part of the RAM memory (total memory) is allocated to the Kernel.
During process management, the Kernel sends programs to an address space. The part of the total memory allocated to the Kernel ensures there is always memory available so that the main processes are sent to that space.
The Kernel also has the function of defining the portion of memory that each process can access during its operation.
Device Management
the kernel controls the peripherals connected to the computer.
Whenever a user connects a device (for example, pen drive, printer, headphones, keyboard, mouse, etc.), the Kernel manages the memory of that device and its communication with programs and with the hardware from the computer.
Each device has a drive that is designed to work on a particular operating system. Therefore, a driver designed for Windows does not work, for example, on a MAC.
O driver The function of each device is to carry out a kind of translation of commands executed between a certain electronic device and the computer's operating system.
The services of an operating system are accessed through a user interface designated as shell, which in English means “shell”. The name is due to the fact that the shell be the outermost layer, around the core.
See the meaning of interface.
system calls
System calls are specific functions available to computer programs used in user mode. They are used to invoke the core of a computer's operating system so that it perform certain action.
These functions are often complex and use features that the average user does not have access to.
Below are some examples of Windows system calls and their corresponding Linux Kernel.
Windows | Linux | Description |
---|---|---|
closehandle |
close |
close file |
CreateFile | open | create file |
DeleteFile | unlink | delete file |
ExitProcess | exit | End a process and all its segments |
GetLocalTime | team | Retrieve current location, date and time |
know more about Windows.
Kernel Types
As far as its architecture is concerned, the core of an operating system can be monolithic, hybrid or be a micronucleus.
Monolithic
Device drivers and core extensions run in the core space, with full access to the hardware.
As all modules run in the same address space, if an error occurs in one of these spaces, the entire system can be affected.
Examples of monolithic: Linux, BSD, MS-DOS and Solaris.
Linux is one of the best known Monolithic Kernels. Like software free and portable that it is, Linux has the advantage of running on dozens of platforms, from IBM computers to mobile devices, smartphones or iPods.
know more about software andhardware.
Microkernel or microkernel
The microkernel, as its name implies, is a very small kernel and, for this reason, it runs as few processes as possible in the Kernel space. Some of these processes run in user space.
With the micro-kernel type Kernel, if an error occurs, just restart the service that presented the problem. This prevents the entire system from being brought down (as happens with the Monolithic Kernel).
Examples of micronuclei: AIX, BeOS, L4, Mach, Minix, MorphOS, QNX, RADIOS, VSTa and GNU Hurd.
Hybrid
Hybrid systems are considered systems that work with a middle ground compared to monolithic and micronucleus systems. Hybrid combines microkernel stability and security with monolithic performance.
The Hybrid Kernel is similar to a microkernel, but has code ("non-essential") in the kernel space so that the operations performed are faster.
Examples of hybrids: AmigaOS, Android, Chrome, Macintosh, webOS, Windows, OSX and Xinu.
the kernel of Android is built from Linux. However, not everyone rate the Android like Linux as they consider it to be just based on Linux, but not Linux itself.
know more about Android.