A kernel is a software that is an essential part of the operating system. It is primarily responsible for providing secure access to computer hardware for various programs.
What is a Kernel in an Operating System, and What Does It Do?
The system is responsible for managing resources through call services. It is also responsible for deciding which program can use a hardware device and what is known as multiplexing.
Direct access to the hardware can be really complicated, so the cores often apply a number of hardware abstractions.
It hides this complexity and facilitates the developer’s use by providing a clean and neat interface to the underlying hardware.
What Does It Do?
- It provides memory management for all running programs and processes.
- Provides processor time management using running programs and processes.
- It provides communication between programs that require resources and hardware.
- It provides the management of different computer programs (tasks) of a machine.
- It performs hardware management.
Kernel Types
You don’t need a kernel to use a computer. Programs can be installed and run directly on a blank computer as long as they want to develop them without any hardware abstraction or any help from the operating system.
This was the usual way to use most of the first computers to use different programs that you had to restart and reconfigure the computer every time.
Over time, minor side programs, such as installer and debugger, were left in memory or loaded from read-only memory, even between different runs. As they evolved, they became the basis for what the oldest operating system kernels would be.
There are four main types of kernels:
- Monolithic
It provides truly powerful and diverse abstractions of the underlying hardware.
- Micronuclei
It provides a small set of simple hardware abstractions and uses applications called servers to offer more functionality.
- Hybrid
They are very similar to pure micro cores, except that they add additional code to the Kernel field to make them work faster.
- Exonuclei
It does not facilitate any abstraction but allows the use of libraries that provide more functionality thanks to direct or almost direct access to the hardware.
Linux Kernel
The boot folder will also have critical files called initrd.img version, System.map version, and configuration version. The initrd file is used as a small RAM disk that extracts and executes the file from the current core.
The System.map file is used for memory management before Kernel Kernelly loaded, and the configuration file tells the core which options and installation modules to run at startup.
Linux Architecture
Since this species is monolithic, it is more complex than other species.
This was a design feature that was discussed a bit in the early days of Linux and still has some of the design flaws that monolithic kernels have.
It is to make modules that Linux kernel developers can load and download at runtime to overcome these flaws.
This can go beyond adding hardware functionality to the core by adding modules that run server processes, such as low-level animation. Still, in some cases, it can allow the computer to be replaced entirely by causing unnecessary reboots.
Core Modules
LKM (Loadable Kernel Modules) is required to keep it running with all hardware without consuming all available memory.
A module usually enhances the core functions, such as devices, file systems, and system calls. LKMs have an extension. It is generally stored in the /lib/modules directory.
Due to its modular nature, you can easily customize it by setting or setting installation modules, booting with the menuconfig command, or editing the /boot/config file, or you can load and download modules instantly with modprobe.
Third-party and closed-source modules are available in some distributions, such as Ubuntu, and cannot be installed by default because the source code of the modules is not available.
Software development companies do not provide source code; instead, they create modules and compile their files.
Although these modules are free, as in beer, they are not free as in speech and, therefore, are not included in some distributions because the protectors think they are polluting the kernel Kernelviding non-free software.
Windows Kernel
Windows is an operating system that can compete with others like Unix, which already has a privileged position, in terms of results, it has a number of features that allow it to win that place.
Kernel-Mode
HAL (Hardware Abstraction Layer) is an interface between the hardware and the rest of the operating system. It is implemented as a DLL and is responsible for protecting the rest of the system from hardware features such as interrupt drives and input/output interfaces.
This abstraction makes the system more portable because the rest of the system does not have to worry about which platform it is running on.
Each platform on which the system operates needs a sure HAL. When the design is moved to the new processor architecture of Windows, HAL is rewritten for the latest processor, but the rest of the system needs to be recompiled.
MicroKernel
It is responsible for all actions performed on the system, and almost all functions of the system pass through the system.
MikroKernel is located in the heart of Windows, works very closely with HAL, plans the execution of threads, and manipulates interruptions and exceptions of processes.
Its role is to keep the processors as busy as possible. In general, the entire operating system is responsible for thread execution, multiprocessor synchronization, and handling hardware outages.
The Windows kernel deals with vital tasks that are vital to the entire system, as the microkernel is almost always too busy to be handled directly.
Object Manager is used to create, modify, and delete objects used by all systems that make up Windows Executor.
It also provides information about the status of objects in the entire operating system.
Transaction Manager
The Process Manager is responsible for creating, removing, and changing the states of all processes and threads. It also provides information about the status of processes and threads to the rest of the system.
Virtual Memory Manager
VMM (Virtual Memory Manager) provides virtual memory management of the system. Virtual memory is a diagram that allows you to use the resources of the disk instead of the physical memory of the system that carries the pages to disk when not in use and saves them when necessary.
This is an integral part of Windows that allocates 32-bit address space to each process without worrying about the amount of physical memory in the system.
Local Procedures Services
LPC (Local Procedure Call Facility) is integrated into the Windows client/server design. This is the interface between all client and server processes running locally on the system.
Security Monitor
SRM (Security Reference Monitor) is the bed of all security in the Windows system and is responsible for the implementation of all security policies on the local computer.
Input/Output Manager
The Input-Output Manager is responsible for managing communication between different device drivers, where each driver implements a well-defined interface that allows homogeneous processing of all drives without the need for intervention.
Win32 Subsystem
This subsystem acts as a server for all other supported media subsystems in Windows that act as clients and convert API calls to appropriate Win32 APIs.
The Win32 subsystem is responsible for all inputs and outputs. The screen has a keyboard and mouse control. When other subsystems, such as OS/2 or POSIX, need to take advantage of these devices, they request service from the Win32 subsystem.
Some of the goals set to ensure compatibility with applications made in previous versions:
- It allows programs made on DOS to run without modification.
- It provides the ability to run most 16-bit Windows applications unchanged.
- It protects the system and other 32-bit applications from interference from 16-bit and DOS applications.
- It allows RISC platforms to run 16-bit and DOS Windows applications.
POSIX
While Windows NT was in development, Microsoft Subsystem paid much attention to different open system standards.
They recognized the value of supporting open systems as a way of accepting new advanced operating systems on the market.
One of the most widely mentioned standards supported by Windows is POSIX (Unix-based Portable Operating System Interface), which represents the interface of the Portable Operating System and was developed as a method by the IEEE (Institute of Electrical and Electronics Engineers). Provides portability to applications made on UNIX platforms.
However, POSIX is integrated into many non-UNIX systems. The OS/2 Subsystem provides an environment for UNIX applications. Just like the POSIX subsystem, this subsystem supports OS/2 applications.
It provides a graphical interface and system calls; calls are presented with the help of Windows Executor.
A Kernel is necessary for any computer to function correctly. The Linux kernel is different from OS X and Windows as it contains kernel-level drivers and does much more.