Back to Technology

Part 23: Case Studies

January 31, 2026 Wasil Zafar 35 min read

Compare Linux, Windows, and macOS to understand how different operating systems solve common challenges.

Table of Contents

  1. Introduction
  2. Linux Overview
  3. Windows Overview
  4. macOS Overview
  5. Kernel Comparison
  6. Scheduling Comparison
  7. Memory Management
  8. File System Comparison
  9. Conclusion & Next Steps

Introduction

Each major operating system represents different design philosophies and trade-offs. Comparing them reveals the diversity of approaches to common OS challenges.

Series Context: This is Part 23 of 24 in the Computer Architecture & Operating Systems Mastery series. We compare the three major desktop/server operating systems.

Computer Architecture & OS Mastery

Your 24-step learning path • Currently on Step 23
1
Part 1: Foundations of Computer Systems
System overview, architectures, OS role
2
Digital Logic & CPU Building Blocks
Gates, registers, datapath, microarchitecture
3
Instruction Set Architecture (ISA)
RISC vs CISC, instruction formats, addressing
4
Assembly Language & Machine Code
Registers, stack, calling conventions
5
Assemblers, Linkers & Loaders
Object files, ELF, dynamic linking
6
Compilers & Program Translation
Lexing, parsing, code generation
7
CPU Execution & Pipelining
Fetch-decode-execute, hazards, prediction
8
OS Architecture & Kernel Design
Monolithic, microkernel, system calls
9
Processes & Program Execution
Process lifecycle, PCB, fork/exec
10
Threads & Concurrency
Threading models, pthreads, race conditions
11
CPU Scheduling Algorithms
FCFS, RR, CFS, real-time scheduling
12
Synchronization & Coordination
Locks, semaphores, classic problems
13
Deadlocks & Prevention
Coffman conditions, Banker's algorithm
14
Memory Hierarchy & Cache
L1/L2/L3, cache coherence, NUMA
15
Memory Management Fundamentals
Address spaces, fragmentation, allocation
16
Virtual Memory & Paging
Page tables, TLB, demand paging
17
File Systems & Storage
Inodes, journaling, ext4, NTFS
18
I/O Systems & Device Drivers
Interrupts, DMA, disk scheduling
19
Multiprocessor Systems
SMP, NUMA, cache coherence
20
OS Security & Protection
Privilege levels, ASLR, sandboxing
21
Virtualization & Containers
Hypervisors, namespaces, cgroups
22
Advanced Kernel Internals
Linux subsystems, kernel debugging
23
Case Studies
Linux vs Windows vs macOS
You Are Here
24
Capstone Projects
Shell, thread pool, paging simulator
Design Philosophy Matters: Linux prioritizes flexibility and transparency. Windows emphasizes compatibility. macOS focuses on integration. These philosophies shape every technical decision.

Linux Overview

Linux is a free, open-source kernel powering everything from phones (Android) to supercomputers.

Linux History & Philosophy

Linux Timeline:
══════════════════════════════════════════════════════════════

1991  Linus Torvalds releases Linux 0.01
1994  Linux 1.0 (TCP/IP, X Window)
1996  Linux 2.0 (SMP support)
2003  Linux 2.6 (O(1) scheduler)
2011  Linux 3.0 (cgroups mature)
2020  Linux 5.x (io_uring, eBPF)

Design Philosophy:
• "Everything is a file"
• Small tools that do one thing well
• Open development, GPLv2 license
• Performance and flexibility over ease of use

Windows Overview

Windows NT is Microsoft's kernel since Windows NT 3.1 (1993), designed for compatibility and enterprise features.

Windows NT Architecture:
══════════════════════════════════════════════════════════════

 User Mode
 ┌───────────────────────────────────────┐
 │  Win32 Apps | UWP Apps | Subsystems  │
 ├───────────────────────────────────────┤
 │        NTDLL.DLL (NT API)             │
 └───────────────────────────────────────┘
                    │
 Kernel Mode        ▼
 ┌───────────────────────────────────────┐
 │    Executive (NT Kernel Services)     │
 │  • Process Mgr   • Memory Mgr         │
 │  • I/O Mgr       • Object Mgr         │
 ├───────────────────────────────────────┤
 │    HAL (Hardware Abstraction Layer)   │
 └───────────────────────────────────────┘

Key Features:
• Object-based design (everything is an object)
• Strong backward compatibility
• Registry for configuration
• Hybrid kernel (microkernel-like structure, monolithic performance)

macOS Overview

XNU ("X is Not Unix") is Apple's hybrid kernel combining Mach microkernel with BSD Unix.

XNU Kernel Structure:
══════════════════════════════════════════════════════════════

┌───────────────────────────────────────┐
│           BSD Layer (FreeBSD)          │
│   POSIX APIs, VFS, Networking Stack    │
├───────────────────────────────────────┤
│            Mach Microkernel            │
│   IPC, Memory, Thread scheduling       │
├───────────────────────────────────────┤
│              I/O Kit                   │
│   C++ driver framework                 │
└───────────────────────────────────────┘

Unique Features:
• Grand Central Dispatch (GCD) for concurrency
• Mach ports for secure IPC
• Apple Silicon (ARM) unified memory architecture

Kernel Comparison

Kernel Architecture Comparison:
══════════════════════════════════════════════════════════════

Aspect          Linux           Windows NT      macOS (XNU)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Type            Monolithic      Hybrid          Hybrid
Source          Open (GPL)      Closed          Partial open
LOC             ~30M            ~50M (est.)     ~8M

Syscall         syscall inst    sysenter/int2e  mach_msg/BSD
IPC             Pipes, sockets  Named pipes,    Mach ports
                signals, SysV   LPC/ALPC        BSD sockets

Scheduling Comparison

CPU Scheduling Approaches:
══════════════════════════════════════════════════════════════

LINUX (CFS - Completely Fair Scheduler):
• Red-black tree of tasks, sorted by virtual runtime
• Tasks that run less get scheduled more
• Per-CPU runqueues, periodic load balancing
• Priority: nice values (-20 to +19)

WINDOWS (Multilevel Feedback Queue):
• 32 priority levels (0-31)
• Higher priority always preempts lower
• Priority boost for I/O-bound tasks
• Foreground window priority boost

macOS (Mach-based):
• Thread-centric scheduling (not process)
• Quality of Service (QoS) classes
• Grand Central Dispatch integrates with scheduler
• Priority: kernel manages based on QoS

Memory Management

Virtual Memory Implementation:
══════════════════════════════════════════════════════════════

LINUX:
• 4-level page tables (x86-64)
• Demand paging with copy-on-write
• Slab allocator for kernel objects
• OOM killer when memory exhausted

WINDOWS:
• Paged and non-paged pools
• Working Set management (per-process)
• Standby list for quick reclaim
• SuperFetch (predictive loading)

macOS:
• Compressed memory (in-RAM compression)
• Memory pressure notifications to apps
• Unified memory on Apple Silicon (CPU+GPU share)

File System Comparison

Default File Systems:
══════════════════════════════════════════════════════════════

Linux: ext4 (default), btrfs, XFS, ZFS
  • Journaling, extents, delayed allocation
  • Case-sensitive by default
  • POSIX permissions + ACLs

Windows: NTFS (default), ReFS
  • MFT (Master File Table)
  • Case-insensitive (preserving)
  • ACLs with inheritance
  • Alternate data streams

macOS: APFS (Apple File System)
  • Copy-on-write, snapshots
  • Space sharing between volumes
  • Native encryption
  • Case-insensitive by default (macOS)

Max File Size:
  ext4: 16 TiB      NTFS: 16 EiB      APFS: 8 EiB

Conclusion & Next Steps

Each OS represents different trade-offs:

  • Linux: Flexibility, transparency, server dominance
  • Windows: Compatibility, enterprise features, desktop market
  • macOS: Integration, user experience, creative workflows
Key Insight: There's no "best" OS—only the right tool for the job. Understanding how each works helps you leverage their strengths and work around limitations.

Next in the Series

In Part 24: Capstone Projects, we'll apply everything we've learned by building real OS components from scratch.