What is the Kernel?
The kernel, or core, is a fundamental part of the operating system that grants secure access to hardware to all requesting software. The kernel is a small and invisible part of the operating system, but it is the most important, as the system needs to function. All operating systems have a kernel, including Windows 10, but perhaps the most famous is the Linux kernel, which is now integrated into Windows 10 with its latest updates.
The operating system runs in privileged mode with special access to system resources to fulfill access requests from software that needs them. Since resources are not unlimited, it also acts as an arbiter in allocating them, deciding the order of received requests based on their priority and importance. This crucial and fundamental management process often goes unnoticed, even though it is essential for coordinating all the hardware and software.
The Windows kernel is proprietary, and its code is kept secure, with only Microsoft able to make modifications to improve future versions of Windows 10. The same is true for macOS, which is Unix-based but also proprietary, and is reserved for the Apple development team responsible for making these modifications. However, Linux has a public kernel under the GPL v2 license, and its code (or most of it) is available for download, examination, and even for making contributions and modifications that are useful for other users.
The source code for the MS-DOS operating system has been published on GitHub for examination. This operating system consists of a basic kernel in which only one instruction can be executed at a time. If you are curious and would like to know how an operating system without multi-user support is programmed, you can download its source code and examine it, or even modify it to your liking to make it work on a PC.
What is the purpose of the Kernel?
The kernel, or core, of an operating system manages the hardware resources requested by different software components. It acts as an intermediary, deciding what and when to grant access, thus preventing system overload, unnecessary resource allocation, and malicious software from accessing the kernel itself and ultimately controlling the entire system. In this way, the kernel serves as a security element, passing through several layers before being granted access. Furthermore, it must distribute resources efficiently and systematically so that the hardware and software work together optimally.
Although we usually associate a kernel or operating system core with a PC, it is also present and used to run all the computers we can find today, such as a car or boat onboard computer, a Raspberry Pi running an adapted version of Linux Debian, or mobile devices with Android and iOS, which also have a Linux/Unix-based kernel.
It also handles granting access to all connected peripherals and interacting with the software that requests them, even if they aren’t the ones we usually work with. For example, if we occasionally connect a mobile phone to use as a webcam with DroidCam, this kernel grants the necessary permissions to the software to manage and access the image and audio for use in videoconferencing or meeting software, for instance, if we’re working remotely from home or anywhere else.
The kernel is responsible for making basically everything work; it has to be able to boot, for example, a PC from the moment we turn it on until we see the desktop visible, all this by communicating with the hardware elements that the PC has and that are also necessary to make it work. Once we have the desktop, it must be able to run the programs that we want to open and make them work on our PC.