๐Ÿ“˜ Visual Posts About Contact
Explore ๐Ÿ“‹ Cheat Sheets โœ๏ธ Practice ๐ŸŽฎ Games ๐ŸŽฌ Simulations ๐Ÿƒ Flashcards ๐ŸŽฏ Interactive Layers ๐Ÿ“– Storytelling
๐Ÿ’œ Support my site

Master Windows Internals

Zero to Hero Visual Learning 2026 Updated

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.

Start Learning โ†“
USER MODE (Ring 3) โ€” Restricted Sandbox Browser msedge.exe Text Editor notepad.exe Win32 / ntdll API Gatekeepers SYSCALL SECURITY WALL KERNEL MODE (Ring 0) โ€” Full Hardware Access Windows Kernel ntoskrnl.exe CPU, RAM, File I/O Drivers & HAL *.sys + hal.dll GPU, SSD, Network NIC

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.
BANK LOBBY (User Mode) Apps & Background Programs Isolated Memory Space Each app gets its own private sandbox Safe Failure App crash = "Not Responding", OS stays alive Must Ask Permission Cannot touch CPU, Disk, or other apps directly Syscall BANK VAULT (Kernel Mode) OS Core & Hardware Drivers Shared Kernel Space Full access to all RAM and CPU instructions Critical Failure Kernel/Driver bug = Blue Screen (BSOD) Hardware Boss Schedules threads, writes to SSD, draws screen

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 like CreateFileW() or WriteFile().
  • 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 CPU syscall instruction.
  • 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.
USER MODE (RING 3) 1. Application notepad.exe Calls WriteFile() 2. Win32 API kernel32.dll Standard Windows API 3. Native API ntdll.dll Executes syscall 4. SYSCALL (Ring 3 โ†’ Ring 0) KERNEL MODE (RING 0) 5. Windows Kernel ntoskrnl.exe Security + I/O Manager 6. Hardware HAL hal.dll + Drivers Hides chipset differences Physical Hardware CPU โ€ข RAM โ€ข NVMe File safely written!

๐Ÿง  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.dll and ntoskrnl.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:\ (NTFS Volume) Indexed by Master File Table (MFT) C:\Windows The OS Brain \System32 (Core DLLs) C:\Program Files 64-bit Installed Apps (& (x86) for 32-bit) Admin write only C:\Users\<Name> Desktop, Documents Downloads, AppData Private ACL locked C:\ProgramData Shared App Data Hidden by default All-user configs NTFS Superpowers: โ€ข ACLs (Read/Write/Full Control) โ€ข Journaling (Crash Recovery) โ€ข Shadow Copies & EFS
SYS

C:\Windows\System32

Holds core 64-bit OS executables (cmd.exe, ntoskrnl.exe), DLLs, and device drivers (\drivers). Never delete files here manually.

APP

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.

USR

C:\Users\<Username>

Your personal profile, including Desktop, Documents, and the hidden AppData folder where per-user app settings live.

ACL

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 Files and C:\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:

WINDOWS REGISTRY regedit.exe (Keys & Values) HKLM Local Machine System-wide Hardware, OS, \Services HKCU Current User Logged-in user Theme, wallpaper, per-user apps HKCR Classes Root File extensions (.pdf, .txt, .html) Default app map HKU Users All user profiles Indexed by SID (Security ID) HKCC Current Config Active hardware profile used at boot time How Windows Services Start: services.exe reads HKLM\SYSTEM\CurrentControlSet\Services โ†’ launches svchost.exe Tip: On modern PCs (3.5 GB+ RAM), Windows runs each service in its own isolated svchost.exe process for stability.

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) vs HKCU (current user) to the right type of setting?
  • Explain why seeing dozens of svchost.exe processes 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).

POWERSHELL OBJECT PIPELINE (Verb-Noun) Passes structured objects, not plain text Get-Process Verb: Get Noun: Process Outputs Process Objects | Where-Object { $_.CPU -gt 50 } Filters objects where CPU time > 50s | Sort-Object CPU -Descending Ranks heaviest processes at top PS C:\> Get-Service -Name wuauserv | Restart-Service Result: Instantly restarts the Windows Update service without opening any GUI menus.

๐Ÿ“ 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-Noun pattern means in PowerShell?
  • Describe how the pipe (|) passes objects from one PowerShell command to the next?

06 Knowledge Check

Test your Windows Internals knowledge โ€” click an option for instant feedback. Score: 0 / 7

1. Why does Windows separate User Mode (Ring 3) from Kernel Mode (Ring 0)?

To isolate apps so a single app crash cannot crash the entire OS or access hardware directlyโœ…
To make apps run slower on purpose for battery savingโŒ
Because User Mode is only for 32-bit Windows 7 PCsโŒ

2. Which User Mode DLL acts as the final gatekeeper that triggers a System Call into ntoskrnl.exe?

hal.dllโŒ
ntdll.dllโœ…
svchost.exeโŒ

3. On an NTFS drive, what is the Master File Table (MFT)?

A backup copy of the Windows RegistryโŒ
The master index tracking every file, its metadata, permissions, and disk locationโœ…
A tool that formats USB drives to FAT32โŒ

4. Where does Windows store core 64-bit OS files, system DLLs, and drivers?

C:\Users\PublicโŒ
C:\Program FilesโŒ
C:\Windows\System32โœ…

5. Which Registry Hive stores settings that apply only to the currently logged-in user?

HKCU (HKEY_CURRENT_USER)โœ…
HKLM (HKEY_LOCAL_MACHINE)โŒ
HKCR (HKEY_CLASSES_ROOT)โŒ

6. A PC randomly rebooted last night with a Blue Screen of Death (BSOD). Which tool should you open first to inspect historical crash and service error logs?

Task ManagerโŒ
Event Viewer (eventvwr.msc)โœ…
NotepadโŒ

7. What makes the PowerShell pipeline (|) different from older text-based command shells?

It passes structured .NET objects instead of raw plain textโœ…
It only works with two commands at a timeโŒ
It bypasses NTFS permissions automatically without Admin rightsโŒ