Linux Internals & Kernel Mastery
A comprehensive, interview-focused curriculum designed for engineers targeting infrastructure, observability, and platform engineering roles at companies like Datadog, Grafana Labs, Honeycomb, Chronosphere, New Relic, Splunk, Cloudflare, and FAANG infrastructure teams.Modules: 25+ deep-dive modules covering the complete kernel
Target Roles: Infrastructure Engineer, Platform Engineer, SRE, Observability Engineer, Kernel Developer
Prerequisites: C programming, basic Linux command line, OS fundamentals
Hands-on Focus: 60% theory, 40% practical labs with real kernel code
Why This Course?
Infrastructure and observability companies need engineers who understand Linux at its deepest levels. They build tools that:- Monitor millions of systems in real-time
- Trace application behavior with eBPF
- Profile production workloads without overhead
- Debug issues that span kernel and user space
Interview Ready
Kernel-First Approach
eBPF & Tracing
Production Systems
Target Companies & Roles
| Company Type | Example Companies | Key Focus Areas |
|---|---|---|
| Observability | Datadog, Grafana, Honeycomb, Chronosphere, New Relic | eBPF, tracing, metrics, kernel events |
| Infrastructure | Cloudflare, Fastly, Akamai, Fly.io | Networking stack, performance, syscalls |
| Cloud Platforms | AWS, GCP, Azure infrastructure teams | Virtualization, containers, scheduling |
| Database | CockroachDB, TiDB, ScyllaDB, ClickHouse | I/O, memory management, storage |
| FAANG Infra | Meta Infra, Google SRE, Netflix Platform | Full spectrum of kernel knowledge |
Course Architecture
Track 1: Kernel Foundations
Master the fundamental architecture before diving into subsystems.Module 1: Kernel Architecture
Module 1: Kernel Architecture
- Monolithic vs microkernel design — why Linux chose monolithic
- Kernel source tree organization and navigation
- Boot process: BIOS/UEFI → bootloader → kernel initialization
- Kernel address space layout (KASLR, kernel/user split)
- Kernel threads vs user threads
- Loadable kernel modules (LKMs) — architecture and lifecycle
- Kernel configuration and compilation
Module 2: System Call Interface
Module 2: System Call Interface
- System call mechanism:
syscallinstruction, MSRs - System call table implementation and dispatching
- Context switch on syscall entry/exit
- vDSO (virtual dynamic shared object) optimization
- Syscall overhead measurement and optimization
- Adding a new system call (lab exercise)
- seccomp-BPF: system call filtering
- Compatibility layers: 32-bit on 64-bit, personality
Module 3: Kernel Data Structures
Module 3: Kernel Data Structures
- Linked lists:
list_head, circular doubly-linked - Red-black trees:
rb_treeusage and implementation - Radix trees and XArray for efficient lookups
- Hash tables in the kernel
- Per-CPU variables and cache optimization
- RCU (Read-Copy-Update) data structures
- Memory allocation: kmalloc, vmalloc, slab allocator
Module 4: Interrupts & Exceptions
Module 4: Interrupts & Exceptions
- Interrupt Descriptor Table (IDT) and interrupt vectors
- Hardware interrupts: IRQ handling and sharing
- Top-half and bottom-half processing
- Softirqs: high-priority deferred work
- Tasklets: dynamically schedulable softirqs
- Workqueues: process context deferred work
- Threaded IRQs and IRQF_ONESHOT
- Interrupt affinity and balancing (irqbalance)
- Exception handling: page faults, general protection faults
- NMI (Non-Maskable Interrupts) and MCE
Module 5: Synchronization Primitives
Module 5: Synchronization Primitives
- Spinlocks: basic, reader-writer, raw spinlocks
- Mutexes vs spinlocks: when to use each
- Semaphores and completions
- Read-Copy-Update (RCU) deep dive
- Sequence locks (seqlocks)
- Per-CPU variables and preemption control
- Memory barriers and ordering
- Atomic operations and compare-and-swap
- Lockdep: the kernel lock validator
- Common deadlock patterns and avoidance
Track 2: Process & Memory
The two most critical subsystems in the kernel.Module 4: Process Subsystem Deep Dive
Module 4: Process Subsystem Deep Dive
task_struct— the process descriptor in detail- Process creation:
fork(),vfork(),clone(),clone3() - Copy-on-write implementation
- Process termination and zombie handling
- Thread implementation: NPTL,
futex - Scheduler architecture: CFS, deadline, real-time
- Scheduler classes and policies
- Load balancing and CPU migration
- NUMA-aware scheduling
- CPU affinity and isolation (
isolcpus,taskset)
Module 5: Memory Management Internals
Module 5: Memory Management Internals
- Physical memory organization: zones, nodes, pages
- Buddy allocator for page allocation
- Slab allocator: SLUB, SLAB, SLOB
kmallocvsvmallocvskzalloc- Page tables: 4-level (5-level) page tables
- TLB management and shootdowns
- Virtual memory areas (VMAs) and
mm_struct - Memory mapping:
mmap()implementation - Huge pages: transparent and explicit
- Memory reclaim: kswapd, direct reclaim
- OOM killer: scoring and behavior
- Memory cgroups and limits
Module 6: Virtual Memory & Address Translation
Module 6: Virtual Memory & Address Translation
- x86-64 virtual address space layout
- Page table walks and hardware support
- Page fault handling: minor, major, invalid
- Demand paging and lazy allocation
- Copy-on-write mechanics
- Shared memory implementation
- Memory-mapped I/O (MMIO)
- IOMMU and DMA mapping
- Memory protection keys (MPK)
Module 7: Signals & IPC
Module 7: Signals & IPC
- Signal delivery and handling
- Signal masks and blocking
- Real-time signals vs standard signals
- sigaction vs signal semantics
- Pipes and FIFOs internals
- System V IPC: message queues, semaphores, shared memory
- POSIX IPC mechanisms
- Unix domain sockets for IPC
- eventfd, signalfd, timerfd
- D-Bus and modern IPC patterns
Track 3: I/O & Storage
Understanding the storage stack from applications to disks.Module 7: VFS & File Systems
Module 7: VFS & File Systems
- VFS architecture: superblock, inode, dentry, file
- File system registration and mounting
- Path lookup: namei and dcache
- Inode operations and file operations
- ext4 internals: extents, journaling, delayed allocation
- XFS: B+ trees, allocation groups, delayed logging
- Btrfs: copy-on-write, checksumming, snapshots
- Overlay filesystems and union mounts
- Pseudo filesystems: procfs, sysfs, debugfs
Module 8: Block Layer & I/O Scheduling
Module 8: Block Layer & I/O Scheduling
- Block device architecture
- Bio and request structures
- Multi-queue block layer (blk-mq)
- I/O schedulers: mq-deadline, BFQ, kyber, none
- Request merging and plugging
- Write barriers and ordering
- NVMe driver architecture
- io_uring: modern async I/O
- Direct I/O vs buffered I/O
- I/O prioritization (ionice, cgroups)
Module 9: Page Cache & Writeback
Module 9: Page Cache & Writeback
- Page cache organization and lookup
- Read-ahead: adaptive and explicit
- Dirty page tracking
- Writeback: background and periodic
- flusher threads and dirty ratios
- fsync, fdatasync, sync semantics
- Direct I/O and O_DIRECT
- Memory pressure and cache eviction
- Cgroup writeback throttling
Track 4: Networking Stack
Critical for infrastructure and observability roles.Module 10: Network Stack Architecture
Module 10: Network Stack Architecture
- Network stack layers in Linux
- sk_buff: the network buffer structure
- Packet reception: NAPI, interrupt coalescing
- Packet transmission: qdisc, TSO, GSO
- Protocol handlers: L2, L3, L4
- Routing subsystem: FIB, routing cache
- Neighbor subsystem: ARP/NDP
- Traffic control (tc) and queueing disciplines
- XDP (eXpress Data Path) introduction
- AF_XDP for zero-copy networking
Module 11: Socket Implementation
Module 11: Socket Implementation
- Socket architecture and socket types
- TCP implementation: connection management
- TCP congestion control algorithms (Cubic, BBR)
- TCP buffer management
- UDP implementation
- Unix domain sockets
- Socket options and tuning
- SO_REUSEPORT and load balancing
- Kernel bypass: DPDK concepts
Module 12: Packet Flow & Netfilter
Module 12: Packet Flow & Netfilter
- Netfilter hooks and chains
- Connection tracking (conntrack)
- iptables architecture and rule processing
- nftables: the modern replacement
- NAT implementation
- eBPF for networking: TC and XDP programs
- Network namespaces and veth pairs
- Bridge, macvlan, ipvlan devices
- Container networking under the hood
Track 5: Observability & Tracing
The core skills for observability engineering roles.Module 13: eBPF Deep Dive
Module 13: eBPF Deep Dive
- eBPF architecture and virtual machine
- BPF program types and attach points
- BPF maps: hash, array, ringbuf, perf buffer
- BPF verifier: safety guarantees
- Helper functions and kernel integration
- libbpf and BPF CO-RE (Compile Once, Run Everywhere)
- Writing eBPF programs in C
- bpftrace: high-level tracing language
- BCC (BPF Compiler Collection) tools
- eBPF for networking: XDP, TC
- eBPF for security: LSM hooks
- Production eBPF: overhead and safety
Module 14: Tracing Infrastructure
Module 14: Tracing Infrastructure
- Static tracepoints: how they work
- Dynamic tracing: kprobes and uprobes
- Function tracing: ftrace framework
- Event tracing: trace events and filters
- perf events subsystem
- perf_event_open() interface
- Hardware performance counters (PMU)
- LTTng and kernel ring buffers
- User-space tracing: USDT probes
- Distributed tracing integration
Module 15: Profiling & Flame Graphs
Module 15: Profiling & Flame Graphs
- CPU profiling: sampling vs tracing
- perf record/report/annotate
- Flame graphs: creation and interpretation
- Off-CPU analysis: blocking time
- Memory profiling and leak detection
- Cache miss analysis
- Lock contention profiling
- Latency analysis and histograms
- Continuous profiling in production
- Profiling containers and Kubernetes pods
Track 6: Containers & Isolation
Understanding container technology at the kernel level.Module 16: Namespaces Deep Dive
Module 16: Namespaces Deep Dive
- Namespace types: mnt, uts, ipc, net, pid, user, cgroup, time
- Creating namespaces:
clone(),unshare(),setns() - PID namespace: init process, orphan reaping
- Mount namespace: propagation, pivot_root
- Network namespace: veth, bridges, routing
- User namespace: UID/GID mapping, capabilities
- Namespace interaction with cgroups
- Rootless containers
Module 17: Cgroups v1 & v2
Module 17: Cgroups v1 & v2
- Cgroups v1 architecture and controllers
- Cgroups v2 unified hierarchy
- CPU controller: shares, quota, period
- Memory controller: limits, OOM handling
- I/O controller: BFQ, throttling
- PID controller: process limits
- Cgroup namespaces
- systemd and cgroups integration
- Kubernetes resource management
- Container resource limits in practice
Module 18: Container Runtimes & Security
Module 18: Container Runtimes & Security
- OCI runtime specification
- runc internals: container creation flow
- containerd architecture
- Docker daemon and containerd relationship
- seccomp-BPF in containers
- Capabilities and privilege dropping
- AppArmor and SELinux profiles
- rootfs and overlay filesystems
- gVisor and Kata Containers (isolation alternatives)
- Container escape vulnerabilities
Module 19: Security Modules (LSM)
Module 19: Security Modules (LSM)
- LSM framework architecture and hooks
- SELinux: type enforcement, MLS, RBAC
- AppArmor: path-based MAC
- Capabilities system deep dive
- seccomp-BPF: syscall filtering
- Integrity Measurement Architecture (IMA)
- Extended Verification Module (EVM)
- Landlock: unprivileged sandboxing
- Security namespaces and user namespaces
- Container security hardening patterns
Track 7: Advanced Kernel Topics
Deep dives into specialized kernel subsystems.Module 20: Power & Thermal Management
Module 20: Power & Thermal Management
- CPUFreq governors and scaling drivers
- CPUIdle: idle states and menu/teo governors
- P-states and C-states on x86
- Thermal zones and cooling devices
- Intel RAPL for power measurement
- Runtime PM for device power management
- System suspend and hibernate
- Wake-on-LAN and wake sources
- Power profiling with PowerTOP
- Energy-aware scheduling (EAS)
Module 21: Time Subsystem & Timers
Module 21: Time Subsystem & Timers
- Clocksources and clock event devices
- High-resolution timers (hrtimers)
- Timer wheel for low-resolution timers
- POSIX timers and interval timers
- timerfd and polling on time
- NOHZ (tickless) operation
- Dynamic ticks and power savings
- Real-time clock (RTC) subsystem
- PTP and network time synchronization
- Timer-related debugging
Module 22: Kernel Debugging Techniques
Module 22: Kernel Debugging Techniques
- printk and dynamic debug
- KGDB: kernel source-level debugging
- Kdump and crash dump analysis
- KASAN: kernel address sanitizer
- UBSAN: undefined behavior sanitizer
- KCSAN: concurrency sanitizer
- KMSAN: memory sanitizer
- ftrace for debugging
- Kernel debugging with gdb
- Reading and understanding oops/panic messages
Module 23: Device Driver Model
Module 23: Device Driver Model
- Device model: buses, devices, drivers
- sysfs and kobjects
- Platform devices and device tree
- Character device drivers
- Block device drivers
- Network device drivers
- PCI and USB subsystems
- DMA mapping and coherent memory
- Interrupt handling in drivers
- IOMMU and device isolation
Capstone: Interview Preparation
Module 24: Real Interview Questions
Module 24: Real Interview Questions
- Datadog interview questions and solutions
- Grafana Labs technical discussions
- Cloudflare systems questions
- FAANG infrastructure team questions
- Debugging scenarios with solutions
- System design with kernel considerations
- Take-home assignment patterns
- Live coding: eBPF and systems programming
Module 25: Hands-on Projects
Module 25: Hands-on Projects
- Project 1: Simple container runtime
- Project 2: eBPF-based syscall tracer
- Project 3: Custom I/O scheduler
- Project 4: Network packet analyzer with XDP
- Project 5: Memory profiler
- Project 6: Process monitor with signals
- Project 7: Kernel module for /proc filesystem
- Code review and optimization
- Writing technical documentation
Learning Paths
Observability Focus
Tracks 1, 2, 5 + eBPF projects
Focus: Interrupts, tracing, profiling
Target: Datadog, Grafana, Honeycomb
Infrastructure Focus
Tracks 1-4, 6 + Security modules
Focus: Networking, containers, security
Target: Cloudflare, AWS, Platform teams
Complete Mastery
All 7 tracks + all projects
Full kernel expertise
Target: Any senior infrastructure role
Specialized Paths
Container Runtime Developer
Modules: 1-5, 16-19, 24-25
Focus: Namespaces, cgroups, security
Target: Docker, Kubernetes, containerd teams
Performance Engineer
Modules: 1-6, 8-9, 13-15, 20-22
Focus: Profiling, tracing, debugging
Target: Netflix, Performance teams
Prerequisites & Environment Setup
Programming Skills
Linux Environment
Tools Installation
Recommended Resources
- “Linux Kernel Development” by Robert Love
- “Understanding the Linux Kernel” by Bovet & Cesati
- “BPF Performance Tools” by Brendan Gregg
- kernel.org documentation
What Makes This Course Different
- eBPF expertise: The foundation of modern observability
- Performance analysis: Skills for debugging production issues
- Container internals: Understanding Kubernetes at the kernel level
- Networking stack: Critical for edge/CDN and infrastructure companies
- Real interview prep: Questions from actual Datadog, Grafana, Cloudflare interviews
Course Outcomes
By completing this course, you will be able to:Technical Depth
Observability Tools
Performance Analysis
Container Expertise
Concurrency Mastery
Interview Confidence
Quick Reference: All Modules
| Track | Module | Topic | Duration |
|---|---|---|---|
| 1 | 1 | Kernel Architecture | 10-12h |
| 1 | 2 | System Call Interface | 12-14h |
| 1 | 3 | Kernel Data Structures | 8-10h |
| 1 | 4 | Interrupts & Exceptions | 12-14h |
| 1 | 5 | Synchronization Primitives | 14-16h |
| 2 | 4 | Process Subsystem | 14-16h |
| 2 | 5 | Memory Management | 16-18h |
| 2 | 6 | Virtual Memory | 10-12h |
| 2 | 7 | Signals & IPC | 12-14h |
| 3 | 7 | VFS & File Systems | 14-16h |
| 3 | 8 | Block Layer & I/O | 12-14h |
| 3 | 9 | Page Cache & Writeback | 10-12h |
| 4 | 10 | Network Stack | 16-18h |
| 4 | 11 | Socket Implementation | 12-14h |
| 4 | 12 | Netfilter & Packet Flow | 10-12h |
| 5 | 13 | eBPF Deep Dive | 18-20h |
| 5 | 14 | Tracing Infrastructure | 14-16h |
| 5 | 15 | Profiling & Flame Graphs | 12-14h |
| 6 | 16 | Namespaces | 12-14h |
| 6 | 17 | Cgroups v1 & v2 | 12-14h |
| 6 | 18 | Container Runtimes | 10-12h |
| 6 | 19 | Security Modules (LSM) | 14-16h |
| 7 | 20 | Power & Thermal | 10-12h |
| 7 | 21 | Time & Timers | 10-12h |
| 7 | 22 | Kernel Debugging | 12-14h |
| 7 | 23 | Device Driver Model | 14-16h |
| Cap | 24 | Interview Questions | 10-12h |
| Cap | 25 | Hands-on Projects | 20-24h |
Ready to master Linux internals? Start with Kernel Architecture →