Master Windows Internals
Ever wondered what actually happens when you double-click an app, save a file to C:\, or open Task Manager? Learn how Windows protects its core, organizes every setting, and runs smoothly under the hood.
01 How Windows Works Under the Hood
Windows Architecture is the internal blueprint that allows your apps, files, and physical hardware (CPU, memory, and disk) to work together safely without crashing your entire computer.
At its heart, modern Windows (Windows 10, Windows 11 24H2/25H2, and Windows Server 2025) is built on the Windows NT architecture. Instead of letting every program touch your hard drive or memory directly, Windows splits the entire operating system into two strictly separated worlds: User Mode and Kernel Mode.
๐ฆ Real-World Analogy: The Bank Lobby vs. The Vault
Think of Windows as a high-security bank. User Mode is the Bank Lobbyโcustomers (your apps like Chrome, Word, or games) can walk around, fill out forms, and request cash. Kernel Mode is the Bank Vaultโonly armored tellers (the Windows Kernel and verified drivers) can open the vault, count the money (RAM), or move gold bars (CPU & SSD writes). If a customer in the lobby trips and spills coffee, security escorts that one customer outโthe bank keeps running. If a teller inside the vault causes a fire, the whole bank has to shut down (the dreaded Blue Screen of Death).
Why This Matters for IT Support & Security
- Crash Isolation: When an app freezes in User Mode, Windows can close just that app via Task Manager without rebooting your PC.
- Malware Defense: A malicious PDF or browser script runs in User Mode. Because it cannot directly touch Kernel memory or hardware, Windows security boundaries block it from silently taking over the machine.
- Faster Troubleshooting: Knowing whether a problem lives in User Mode (a buggy app), NTFS permissions (a locked folder), or Kernel Mode (a bad GPU driver) lets you fix issues in minutes instead of guessing.
02 User Mode vs Kernel Mode & System Calls
Define: User Mode (Ring 3) is the restricted execution layer where everyday applications run, while Kernel Mode (Ring 0) is the privileged layer where the Windows core (ntoskrnl.exe) and hardware drivers operate. A System Call (syscall) is the secure bridge that lets a User Mode app ask the Kernel to perform hardware work on its behalf.
Understand: Why can't Notepad just write bytes directly to your SSD? Because if two apps wrote to the same disk sector at the same time, your files would be corrupted instantly. And if any app could read any part of RAM, a simple calculator app could steal your banking password from your browser's memory. CPU privilege rings (Ring 3 vs Ring 0) enforce this rule in hardware.
Know (How a System Call Works Step-by-Step): When you click Save in Notepad, your request travels down a clean 6-step chain:
- 1. Application (
notepad.exe): Calls a friendly Windows function likeCreateFileW()orWriteFile(). - 2. Win32 API (
kernel32.dll): Translates the app's request into a standardized Windows subsystem call. - 3. Native API (
ntdll.dll): The final User Mode stop. It prepares the exact system call number and executes the CPUsyscallinstruction. - 4. System Call Transition: The CPU switches from Ring 3 (User) to Ring 0 (Kernel) and hands control to the System Service Dispatch Table (SSDT).
- 5. Windows Kernel (
ntoskrnl.exe): Validates permissions (ACLs), manages I/O packets, and passes the disk write to the storage driver. - 6. HAL (
hal.dll) & Hardware: The Hardware Abstraction Layer (HAL) translates kernel commands into motherboard-specific electrical signals for your NVMe SSD or CPU.
๐ง Memory Trick: "A Wise Ninja Swims Keenly Home"
App โ Win32 (kernel32.dll) โ Native API (ntdll.dll) โ Syscall โ Kernel (ntoskrnl.exe) โ HAL (hal.dll)
Remember: ntdll.dll is the last stop in User Mode before crossing the wall into ntoskrnl.exe!
When & Execute: Whenever you diagnose a Blue Screen of Death (BSOD) in Event Viewer or WinDbg, look at the faulting module. If it ends in .sys (like nvlddmkm.sys for NVIDIA), it crashed in Kernel Modeโupdating or rolling back that driver fixes it.
โ Checkpoint: Can you...
- Explain why a browser crash doesn't crash all of Windows?
- Name the two key files on each side of a System Call (
ntdll.dllandntoskrnl.exe)? - Describe what the Hardware Abstraction Layer (HAL) does?
03 NTFS, Drive Letters & Windows Folders
Define: NTFS (New Technology File System) is the primary file system Windows uses to store, organize, secure, and recover files on your drives. Unlike Linux (which starts at a single root /), Windows assigns drive letters like C:\ for the system partition and D:\ for secondary drives.
Understand: Without a smart file system, a sudden power outage while saving a document would corrupt your drive. NTFS solves this with journaling (writing a quick "to-do" log before changing data), Access Control Lists (ACLs) so other users can't read your private files, and a master index called the MFT (Master File Table).
Know: Think of the MFT as a giant library card catalog: every single file and folder on C:\ has a record in the MFT storing its name, size, timestamps, permissions, and exact physical clusters on the disk. Inside C:\, Windows separates its own brain, installed apps, and personal files into strict folders:
C:\Windows\System32
Holds core 64-bit OS executables (cmd.exe, ntoskrnl.exe), DLLs, and device drivers (\drivers). Never delete files here manually.
C:\Program Files
Default home for 64-bit apps. Protected by NTFS permissions so standard users can run apps, but only Administrators can modify them.
C:\Users\<Username>
Your personal profile, including Desktop, Documents, and the hidden AppData folder where per-user app settings live.
NTFS Permissions
Every file has an Access Control List (ACL) defining which users or groups have Read, Modify, or Full Control.
Deep Dive: NTFS vs FAT32 vs ReFS (2026 Storage Standards)
FAT32 / exFAT: Used for USB flash drives and SD cards because macOS, Linux, and cameras all read themโbut FAT32 has a 4 GB max file size and zero NTFS security permissions.
ReFS (Resilient File System): Microsoft's next-gen server and Windows 11 Dev Drive file system designed for massive storage pools and automatic bit-rot healing, while NTFS remains mandatory for the Windows boot drive (C:\).
โ Checkpoint: Can you...
- Explain what the Master File Table (MFT) does on an NTFS drive?
- Tell the difference between
C:\Program FilesandC:\Users\<Name>\AppData? - Explain why USB sticks use exFAT/FAT32 while
C:\uses NTFS?
04 The Windows Registry & Services
Define: The Windows Registry is a central, hierarchical database that stores configuration settings for the OS, hardware, installed apps, and user preferences. Windows Services are background programs (managed by services.exe) that run without a user interfaceโeven before you log in.
๐๏ธ Real-World Analogy: The Giant Settings Filing Cabinet
Imagine a massive office building where instead of every employee keeping sticky notes on their desk, every rule in the company is stored in one master 5-Drawer Filing Cabinet (the Registry). Drawer 1 holds building-wide rules (HKLM), Drawer 2 holds your personal desk preferences (HKCU), and inside each drawer are folders (Keys) containing individual settings (Values). Meanwhile, Windows Services are the night-shift staff (like the HVAC, security cameras, and Wi-Fi router) working silently in the background 24/7.
Know: You can inspect the Registry using regedit.exe. Its 5 top-level root folders are called Hives:
Why Are There So Many svchost.exe Processes?
Beginners often panic when they open Task Manager and see 50+ copies of svchost.exe (Service Host). That is completely normal! Many Windows services (like Windows Update, Audio, and DHCP) are built as .dll files rather than standalone .exe files, so svchost.exe acts as their wrapper. On modern Windows 11 systems with more than 3.5 GB of RAM, Windows splits services into separate svchost.exe processes so if one service crashes, it doesn't take down the others.
โ ๏ธ Safety Rule Before Editing the Registry
The Registry has no "Undo" button. Always right-click a key and choose Export to create a .reg backup before modifying anything in regedit.exe.
โ Checkpoint: Can you...
- Match
HKLM(machine-wide) vsHKCU(current user) to the right type of setting? - Explain why seeing dozens of
svchost.exeprocesses in Task Manager is normal? - Name the built-in tool used to start, stop, or set services to Automatic/Manual (
services.msc)?
05 Essential Windows Admin Tools & PowerShell
Define: Windows ships with built-in diagnostic tools to inspect every layer we just learnedโTask Manager, Resource Monitor, Event Viewer, and PowerShell (Microsoft's modern automation shell).
Understand: Clicking around randomly when a PC is slow wastes time. Each built-in tool answers a different question:
| Tool | Launch Command | What It Shows Best |
|---|---|---|
| Task Manager | Ctrl + Shift + Esc |
Quick snapshot of CPU, RAM, Disk, Startup apps, and ending frozen User Mode apps. |
| Resource Monitor | resmon.exe |
Deep live view: which exact process is locking a file, hammering disk I/O, or opening network ports. |
| Event Viewer | eventvwr.msc |
Historical logs (System, Application, Security) to see why a crash or service failure happened. |
| PowerShell 7+ | pwsh / powershell |
Object-based command line using Verb-Noun commands and pipelines to automate fixes at scale. |
Know (The PowerShell Object Pipeline): Unlike older text-only shells where you have to slice up plain text, PowerShell passes live .NET objects from one command to the next using the pipe symbol (|). Every PowerShell cmdlet follows a predictable Verb-Noun naming rule (like Get-Process, Restart-Service, or Test-NetConnection).
๐ Practice Problem: Diagnosing a Slow Laptop
Given: A coworker says their Windows 11 laptop fan is spinning loudly and Disk usage is stuck at 100%, even though they only have Notepad open. In Task Manager, you see one svchost.exe process using heavy CPU and Disk.
Find: Which tool or PowerShell command reveals which specific service inside that svchost.exe is causing the spike, and where do you check for past error logs?
Show Solution
Step 1 (Identify the service): In Task Manager, click the small arrow next to the busy svchost.exe (or right-click โ Go to details / Go to services), OR open Resource Monitor (resmon.exe) โ Disk tab to see the exact file path being read/written.
Step 2 (Check with PowerShell): Run Get-Service | Where-Object { $_.Status -eq 'Running' } or inspect processes sorted by CPU: Get-Process | Sort-Object CPU -Descending | Select-Object -First 5.
Step 3 (Check History): Open Event Viewer (eventvwr.msc) โ Windows Logs โ System to check for recurring service errors or disk warnings.
โ Checkpoint: Can you...
- Pick the right tool between Task Manager, Resource Monitor, and Event Viewer for a given problem?
- Explain what the
Verb-Nounpattern means in PowerShell? - Describe how the pipe (
|) passes objects from one PowerShell command to the next?