Overview
The Windows OS architecture is layered and modular. It is designed to balance performance, security, portability, and compatibility. At a high level, it is broken into user mode and kernel mode, with subsystems and components inside each.
Modes of Operation
User Mode
- Runs applications and some system services.
- Has restricted access to hardware and system resources.
- If a program crashes, it usually does not affect the whole system.
Kernel Mode
- Core of the OS.
- Has unrestricted access to hardware and memory.
- Drivers, the kernel, and executive services run here.
- A failure here usually crashes the system (BSOD — Blue Screen of Death).
+---------------------------+
| User Mode |
| (Restricted Privileges) |
+---------------------------+
|
| System Call (via NTDLL)
v
+---------------------------+
| Kernel Mode |
| (Full Hardware Access) |
+---------------------------+
Architecture Layers
User Mode Components
- Applications — Software like browsers, editors, etc.
- Environment Subsystems — Provide APIs for applications:
- Win32 subsystem (the main one)
- POSIX / OS/2 (older versions only)
- System Processes — e.g.,
smss.exe,csrss.exe,winlogon.exe - User-Mode DLLs — Expose system APIs, e.g.:
kernel32.dlluser32.dllgdi32.dll
Kernel Mode Components
- Executive — High-level kernel services, including:
- Process & Thread Manager — Creates and manages processes and threads
- Memory Manager — Virtual memory, paging
- I/O Manager — Handles I/O requests through IRPs
- Object Manager — Unified namespace for system resources
- Security Reference Monitor — Enforces access control
- Cache Manager — File system cache
- Kernel — Low-level code for thread scheduling, interrupts, and synchronization.
- HAL (Hardware Abstraction Layer) — Abstracts hardware differences so Windows can run on different processors and platforms.
- Device Drivers — Software interface to hardware. Includes file system drivers, display drivers, network drivers, etc.
Architecture Diagram
+-------------------------------+
| User Applications |
+-------------------------------+
| User Mode Subsystems (Win32)|
+-------------------------------+
| System DLLs (kernel32, …) |
+-------------------------------+
| Executive |
| - I/O Manager |
| - Memory Manager |
| - Process Manager |
| - Object Manager |
| - Security Reference Monitor|
+-------------------------------+
| Kernel |
| (Scheduling, Interrupts) |
+-------------------------------+
| Hardware Abstraction Layer |
+-------------------------------+
| Hardware |
+-------------------------------+
I/O System
- Based on a layered driver model.
- All I/O requests use I/O Request Packets (IRPs).
- Supports Plug and Play (PnP) and Power Management.
[ Application ]
|
| ReadFile() API call
v
[ I/O Manager ]
|
| IRP created and passed down
v
[ File System Driver ]
|
v
[ Disk Driver ]
|
v
[ Hardware (Disk) ]
File Systems
Windows supports several file systems:
| File System | Description |
|---|---|
| NTFS | Default. Supports large files, permissions, encryption, journaling. |
| FAT32 | Older, compatible, limited to 4 GB file size. |
| exFAT | Extended FAT, designed for portable storage. |
| ReFS | Resilient File System, designed for servers. |
Security
The Windows security model is built around:
- Access Tokens — Assigned to each process/user session, encoding privileges and group memberships.
- ACLs (Access Control Lists) — Define which users or groups can access a resource.
- Security Reference Monitor — Kernel component that enforces access decisions.
Additional security features include:
- User Account Control (UAC) — Prompts for elevation before privileged actions.
- Kerberos — Default authentication protocol in domain environments.
- BitLocker — Full disk encryption tied to the TPM chip.
Summary
Windows architecture follows a strict separation between user mode and kernel mode. The Executive layer provides essential OS services, the HAL ensures hardware portability, and the security model built on Access Tokens and ACLs ensures controlled access to all system resources. Understanding this layered design is fundamental for systems programming, driver development, and security analysis on Windows.