Skip to content

Article

How Windows works - The Kernel

How does Windows work? And its kernel? Often when I explain the advantages of Linux some context is missing, so it's time to share a bit of knowledge about that subspecies of IT obsolescence called Windows xD

Michele Pelosi 3 min read

In this article
  1. What the kernel is - introduction
  2. The architecture of the Windows kernel: NT
  3. The main components
  4. Kernel mode and user mode
  5. Conclusions

With this article we start a new series dedicated to the inner workings of Windows.

Let's start from the deepest and least visible component of all: the kernel, the heart of the operating system.

What the kernel is - introduction

The kernel is the software layer in direct contact with the computer's hardware: processor, RAM, disks, peripherals.

Its job is to mediate between the physical resources of the machine and the programs the user runs, deciding who can use what and when.

Without the kernel, every application would have to know how to talk directly to every single hardware component: unmanageable chaos. The kernel abstracts this complexity and offers programs a consistent and secure interface.

The architecture of the Windows kernel: NT

Windows is based on a kernel called NT (New Technology), first introduced with Windows NT 3.1 in 1993 and still today the foundation of all modern versions, including Windows 10 and 11.

The NT kernel has an architecture described as hybrid: it is neither a purely monolithic kernel (where everything runs in a single block in close contact with the hardware) nor a pure microkernel (where almost everything is moved outside the kernel for stability reasons).

It is a middle ground designed to balance performance and modularity, keeping some critical components close to the hardware and isolating others in separate layers.

The main components

The NT kernel is organised into several subsystems, each with a precise task:

This division allows Windows to update or fix individual parts of the system without having to rewrite the entire kernel.

Kernel mode and user mode

A key concept for understanding the security and stability of Windows is the distinction between two execution modes:

This separation is a fundamental security barrier: if a program in user mode freezes or makes an error, in most cases it does not crash the whole system, because it cannot directly touch the critical resources reserved for kernel mode.

Conclusions

The NT kernel carries more than thirty years of history with it, and this creates several concrete problems:

-Compatibility as dead weight, because it has to keep software that is decades old working through emulation layers and legacy APIs that weigh down the architecture instead of allowing it to be cleaned up;

-A monolithic architecture that grew over time, with features such as graphics drivers moved into kernel mode for performance, which however increase the attack surface and the risk of BSODs caused by third-party drivers with privileged access;

-An outdated driver model (WDM/WDF), which, unlike more modern approaches, does not isolate drivers in user space, leaving the system exposed to bugs with direct and privileged access;

-Overhead compared to "clean" systems, because more recent or minimalist kernels don't drag along decades of legacy subsystems, telemetry and security layers added later, something Windows only makes up for with more powerful hardware, requiring constant upgrades;

-"Patched-on" rather than native security, with protections such as process isolation and virtualization-based security added on top of an architecture that was not designed from the start with security as a priority;

See also:

How Linux works - The Kernel (not published yet)

commenti.sh

Comments

Written by , IT specialist writing about privacy, security and open source.