What Is a Kernel? Functions and Types of the Operating System Kernel

Sunucun 7 min read

The kernel is the most basic part of an operating system, the part that talks directly to the hardware. It manages resources such as the processor, memory, disk and network card, and applications can reach these resources only through the kernel. In short, the kernel is the bridge between software and hardware. Linux, Windows, macOS and Android each have a kernel. In this article we explain what the kernel does, the kernel types, the “NT Kernel & System” process in Windows, how to check the kernel version and common kernel errors.

Illustration: What Is a Kernel? Funct…

What Does the Kernel Do?

Without a kernel, every application would need separate code for every graphics card, disk or network card it might run on. The kernel hides this complexity and gives applications a standard interface: a browser can connect to the internet without knowing which brand of network card is installed. The kernel handles these details through hardware drivers and turns application requests into commands the hardware understands.

Kernel Space and User Space

In modern operating systems, memory is split into two regions. In kernel space, the kernel and drivers run with full privileges. In user space, applications such as a browser, an office program or a web server run with limited privileges. When an application crashes, usually only that application closes; when an error happens in kernel space, the whole system can stop. This separation provides both stability and security.

Main Functions of the Kernel

1. Process Management

A processor core can do only one thing at a time. The kernel’s scheduler shares processor time between running programs in millisecond slices; it creates, prioritizes, pauses and ends processes and threads. That is how you can listen to music, browse the web and download a file in the background at the same time.

2. Memory Management

The kernel tracks which part of memory each process uses, allocates requested memory and takes it back when the process ends. With virtual memory, each process sees its own separate memory space, so one application cannot corrupt another’s memory. Moving unused pages to disk when RAM runs out (swap on Linux, the page file on Windows) is also the kernel’s job.

3. Device Management

All hardware such as the keyboard, disk, network card and graphics card is managed through device drivers loaded into the kernel. When an application wants to write a file, it passes the request to the kernel, which writes the data to the physical disk through the file system and disk driver. On Linux, drivers mostly come as kernel modules that can be loaded and unloaded at runtime; see our article on Linux kernel and module management for details.

4. System Calls and Interrupts

Applications make a system call to the kernel for privileged tasks such as opening a file, sending data over the network or starting a new process; the kernel checks the request, does the work and returns the result. Hardware gets the kernel’s attention with interrupts: when you press a key, the keyboard controller sends an interrupt, the kernel handles the key press and then resumes what it was doing.

Kernel Types: Monolithic, Micro and Hybrid

In a monolithic kernel, process and memory management, drivers and file systems run as one large program in kernel space. Components call each other directly, so it is fast; however, an error in one driver can affect the whole system. Linux and FreeBSD use this design (Linux gains flexibility through module support).

In a microkernel, only the most basic tasks (basic process and memory management, inter-process communication) stay in kernel space; drivers and file systems run as separate processes in user space. If a driver crashes, the system keeps running, but messaging between components adds overhead. QNX and MINIX 3 are examples.

A hybrid kernel is based on the microkernel design but runs some services in kernel space for performance. The Windows NT kernel and the macOS XNU kernel belong to this group.

FeatureMonolithicMicrokernelHybrid
Where drivers runKernel spaceUser spaceMostly kernel space
PerformanceHighLower because of messagingHigh
Fault isolationWeakStrongMedium
ExamplesLinux, FreeBSDQNX, MINIX 3Windows (NT), macOS (XNU)

Which Operating System Uses Which Kernel?

  • Linux distributions (Ubuntu, Debian, AlmaLinux, Rocky Linux): the Linux kernel. “Linux” is actually the name of this kernel; distributions add tools and packages on top of it.
  • Android: uses a modified Linux kernel.
  • Windows: the Windows NT kernel (file ntoskrnl.exe).
  • macOS and iOS: the XNU kernel (part of Darwin).

What Is NT Kernel & System?

NT Kernel & System in Windows Task Manager (System, PID 4, on the Details tab) represents the Windows kernel and the drivers running in kernel space. It is not a virus and cannot be ended. If this process uses a lot of CPU or disk, the cause is usually a hardware driver, a Windows Update running in the background or disk activity. Updating graphics, network and storage drivers from the manufacturer’s site and using Resource Monitor (resmon) to see which disk or file is being accessed are the first steps.

How to Check the Kernel Version

Linux: This command in the terminal shows the running kernel version (for example 6.8.0-45-generic):

uname -r

Windows: Press Win + R and type winver; the window shows the version and build number. The ver command in Command Prompt gives the same information. macOS: uname -r in Terminal shows the Darwin (XNU) version. Android: Look at Settings → About phone → Software information → Kernel version (menu names differ by manufacturer).

Kernel Panic and Kernel Errors

When the kernel hits an error it cannot recover from, it stops the system safely. On Linux and macOS this is called a kernel panic; the Windows equivalent is the blue screen (stop error). Common Windows kernel errors are:

  • KERNEL_SECURITY_CHECK_FAILURE: The kernel detected a corrupted data structure; usually caused by incompatible or outdated drivers, sometimes by memory (RAM) problems.
  • KERNEL_DATA_INPAGE_ERROR: The kernel could not read data it needed from disk (the page file); check the disk, cables and RAM.
  • Kernel-Power 41: This Event Viewer entry is not an error code; it records that the system restarted without shutting down cleanly, for example after a power cut, a power supply problem or a forced shutdown after a freeze.

The general approach for these errors is the same: update drivers and the operating system, check RAM with Windows Memory Diagnostic and the disk with chkdsk, and roll back a recently installed driver or update if the errors started after it.

The Kernel’s Role on Servers

For server administrators, the kernel is at the center of performance, security and virtualization:

  • Tuning: On Linux, kernel parameters that control the network stack, memory and file system behavior can be changed with sysctl (for example connection queue limits on a busy web server). Test changes in a staging environment first.
  • Security updates: Because a kernel vulnerability can affect the whole system, kernel updates should not be postponed. A restart is usually needed for the new kernel to be used; check the running version with uname -r.
  • Access control: Security modules integrated into the kernel, such as SELinux and AppArmor, restrict with rules which files and ports each process can access.
  • Virtualization: KVM (Kernel-based Virtual Machine) is a kernel module that turns the Linux kernel into a hypervisor; it is widely used in virtual server infrastructure. We cover a KVM-based platform in our article on Proxmox KVM virtualization.

If you want to manage the kernel version and system settings yourself, you can choose a VDS server that you connect to over SSH with root access.

Conclusion

The kernel is the core of the operating system that manages the hardware: it shares processor time, allocates memory, talks to hardware through drivers and handles application requests through system calls. Linux uses a monolithic kernel, while Windows and macOS use hybrid kernels. You can check the kernel version with uname -r on Linux and winver on Windows; for kernel-related errors, the first step is updating drivers and the system.

Categories

Latest guides