Linux Kernel

Deep Dive — Study Catalog

16 parts · 100+ sections · interview-ready depth on networking, DPDK, memory, storage, and virtualization.

Reference Books

CodeBookFocus
LKDLinux Kernel Development (3rd ed.) — Robert LoveCore concepts, scheduling, memory, sync
ULKUnderstanding the Linux Kernel (3rd ed.) — Bovet & CesatiDeep internals, data structures, boot
LKNLinux Kernel Networking — Rami RosenFull network stack internals
ULNIUnderstanding Linux Network Internals — Benvenutisk_buff, protocols, drivers
LDDLinux Device Drivers (3rd ed.) — Corbet et al.Drivers, PCI, block/char devices
TCPIPTCP/IP Illustrated Vol.1&2 — W. Richard StevensProtocol deep-dive
DPDKDPDK Programmer's Guide — DPDK ProjectOfficial DPDK reference
PPHIs Parallel Programming Hard? — Paul E. McKenneyLocking, RCU, memory ordering
PLKAProfessional Linux Kernel Architecture — MauererComprehensive architecture

Part ISystem Boot & Initialization

ULK Ch.1 · LKD Ch.1

Part IIMemory Management

ULK Ch.2,8,9 · LKD Ch.12,15,16

  • §2.1Physical Memory Layout (NUMA / Zones / struct page)
  • §2.2Buddy Allocator
  • §2.3Slab / Slub Allocator
  • §2.4Virtual Memory & Paging (4-level PT, TLB, Huge Pages)
  • §2.5Process Address Space (mm_struct, VMA, mmap, COW)
  • §2.6Page Cache & Buffer Cache (LRU/MRU, writeback)
  • §2.7Memory-Mapped I/O & DMA (ioremap, IOMMU)

Part IIIProcess Management & Scheduling

LKD Ch.3,4,5 · ULK Ch.3,6,11

  • §3.1Process & Thread Data Structures (task_struct)
  • §3.2Process Lifecycle (fork → exec → exit)
  • §3.3CPU Scheduling (CFS, SCHED_FIFO, load balancing)
  • §3.4Preemption & Context Switch
  • §3.5Interrupts & Bottom Halves (IRQ → softirq → NAPI)
  • §3.6Kernel Timers (jiffies, timer wheel, hrtimer, NO_HZ)
  • §3.7Kernel Data Structures (list, hlist, rbtree, xarray, bitmap)

Part IVSystem Calls & User-Kernel Interface

LKD Ch.5 · ULK Ch.10

  • §4.1System Call Mechanism (syscall, vDSO)
  • §4.2Key Networking Syscalls (socket, epoll, io_uring)
  • §4.3ioctl & Netlink
  • §4.4Sync / Async I/O (blocking, O_NONBLOCK, epoll, io_uring, sendfile)
  • §4.5Signals

Part VInterprocess Communication

LKD Ch.17 · ULK Ch.19

  • §5.1Pipes & FIFOs
  • §5.2POSIX IPC (msg queues, shared memory, semaphores)
  • §5.3Futex (fast userspace mutex)
  • §5.4Unix Domain Sockets

Part VIParallel Programming & Synchronization

PPH all · LKD Ch.9,10 · critical interview section

  • §6.1Hardware Foundations (pipeline, store buffer, false sharing, NUMA)
  • §6.2Cache Coherence Protocols (MESI / MOESI)
  • §6.3Memory Barriers & Ordering (smp_mb, acquire/release, C11 model)
  • §6.4Atomic Operations (CAS, fetch-add, ABA problem)
  • §6.5Counting & Per-CPU Counters
  • §6.6Locking Design Patterns (lockdep, ordering, granularity)
  • §6.7Spinlock Internals (ticket → MCS → qspinlock)
  • §6.8Sleeping Locks (mutex, rwsem, semaphore)
  • §6.9Sequence Locks (seqlock_t)
  • §6.10RCU Deep Dive (grace period, call_rcu, SRCU)
  • §6.11Lock-Free & Wait-Free Algorithms (Treiber stack, MS queue, hazard ptrs)
  • §6.12Per-CPU Data & Data Ownership
  • §6.13Deferred Processing (refcount, RCU reclaim, workqueue)
  • §6.14Parallel Design Patterns (batch, sharding, pipeline, map-reduce)
  • §6.15Debugging (lockdep, KCSAN, TSan, perf lock)
  • §6.16Linux Kernel Memory Model (LKMM, litmus tests)

Part VIINetwork Stack Internals

LKN all · ULNI all · TCPIP Vol.1&2

  • §7.1Socket Layer (struct socket → sock → tcp_sock)
  • §7.2sk_buff — Core Data Structure (GSO, GRO, zero-copy)
  • §7.3Network Device Layer (net_device, NAPI, TX/RX path)
  • §7.4Traffic Control & QoS (Qdisc, HTB, cls_flower)
  • §7.5IP Layer (ip_rcv, fragmentation, ICMP)
  • §7.6Routing Subsystem (fib_table, LPM, fib_trie, policy routing)
  • §7.7Neighbor Subsystem (ARP, NDP, proxy ARP, GARP)
  • §7.8TCP/IP Deep Dive (state machine, CUBIC, BBR, SYN Cookie)
  • §7.9UDP & Multicast socket
  • §7.10Netfilter & NAT (5 hooks, conntrack, DNAT/SNAT)
  • §7.11Network Bridge (FDB, MAC learning, STP)
  • §7.12GRE & VXLAN Tunnels
  • §7.13IPv6 (NDP, RA/RS, DHCPv6, extension headers)
  • §7.14Multicast (IGMP, MLD, PIM-SM, RPF)
  • §7.15DHCP Protocol & Proxy DHCP (DORA, DHCPv6)
  • §7.16Routing Protocols (RIP, OSPF, BGP, BIRD)

Part VIIINetwork Drivers & Hardware Interface

LDD Ch.17 · ULNI Ch.8,9 · DPDK docs

  • §8.1PCI / PCIe Device Driver (BARs, MSI-X, pci_probe)
  • §8.2Network Driver Model (TX/RX descriptor rings, DMA, TSO)
  • §8.3SR-IOV (PF / VF, per-VF flow classification)
  • §8.4DDIO (Intel Data Direct I/O)
  • §8.5Character Devices (cdev, file_operations, UIO)
  • §8.6Block Devices (gendisk, blk-mq, struct bio)

Part IXDPDK (Userspace Networking) — Deep Dive

DPDKPG all · critical interview section

  • §9.1Why DPDK: Kernel Bypass Architecture (UIO vs VFIO)
  • §9.2DPDK Startup Flow (rte_eal_init 10 steps)
  • §9.3PMD Poll Mode Driver (descriptor rings, DD bit, doorbell)
  • §9.4NIC Multi-Queue, RSS & Flow Classification (rte_flow)
  • §9.5Memory: Huge Pages, Mempool & Mbuf
  • §9.6NUMA-Aware Programming
  • §9.7Lock-Free Ring Buffer (rte_ring — CAS algorithm)
  • §9.8Cache Optimization (alignment, prefetch, DDIO, WC)
  • §9.9ACL & LPM Classification (DIR-24-8, rte_hash cuckoo)
  • §9.10SR-IOV in DPDK (VF pass-through, VFIO)
  • §9.11Hardware Offload (checksum, TSO, LRO, VXLAN offload)
  • §9.12SIMD in DPDK (SSE4.2, AVX2, AVX-512)
  • §9.13Virtio, vhost-user & vDPA
  • §9.14Pipeline & Run-to-Completion Models
  • §9.15DPDK Hot Upgrade (multi-process, shared memory)
  • §9.16Session Management (fast path / slow path)
  • §9.17QoS in DPDK (rte_meter, rte_sched, distributed rate limit)
  • §9.18DPDK Bonding & Link Aggregation
  • §9.19OVS-DPDK (EMC, dpcls, megaflow, VXLAN)

Part XXDP (eXpress Data Path)

kernel docs · eBPF/XDP reference

  • §10.1XDP Architecture & Motivation (XDP vs DPDK comparison)
  • §10.2XDP Modes (native, generic, offloaded)
  • §10.3AF_XDP Socket (UMEM, fill/completion/RX/TX rings)
  • §10.4XDP Maps & Data Structures (BPF map types)
  • §10.5XDP Use Cases (DDoS, Katran LB, Cilium, monitoring)

Part XIStorage & File Systems

LKD Ch.13,14 · EXT4 docs

  • §11.1VFS (super_block, inode, dentry, address_space)
  • §11.2ext4 File System (extents, JBD2, delayed alloc)
  • §11.3Block Layer (struct bio, blk-mq, I/O schedulers, O_DIRECT)
  • §11.4B+ Tree (split/merge, lock coupling)
  • §11.5Page Cache Management (LRU/MRU, double-write buffer)
  • §11.6Disk Free Space Management (bitmap, buddy)
  • §11.7Coroutines & Cooperative Scheduling (async I/O + ucontext)

Part XIIVirtualization & Containers

LKD Ch.18 · KVM docs · LXC/Docker

  • §12.1CPU Virtualization (KVM/VMX, VMCS, VMEXIT)
  • §12.2Memory Virtualization (EPT, balloon, KSM)
  • §12.3VM Live Migration (dirty page tracking, pre-copy)
  • §12.4Containers: Namespace & Cgroup v2
  • §12.5Container Networking — CNI (veth, VXLAN, Cilium)
  • §12.6Storage Virtualization (virtio-blk, vhost-user-blk, NVMe PT)

Part XIIIHardware Communication & PCIe

PCIe spec · DPDK docs · LDD Ch.15

  • §13.1PCIe Architecture (TLP, credits, LTSSM, lanes)
  • §13.2Memory-Mapped BAR Access (MMIO, write-combining)
  • §13.3DMA & IOMMU (bus address, VT-d, VFIO)
  • §13.4NUMA & CPU Topology (libnuma, lscpu)

Part XIVDebugging & Profiling Tools

LKD Ch.18 · perf docs · kernel tracing

  • §14.1Network Debugging (tcpdump, ss, iperf3, ethtool)
  • §14.2System Call Tracing (strace, ltrace, perf trace)
  • §14.3Performance Profiling (perf stat/record/top, flamegraph)
  • §14.4Kernel Debugging (gdb+KGDB, crash, KASAN, OOPS)
  • §14.5Kernel Tracing (ftrace, kprobe, eBPF/bcc, bpftrace)
  • §14.6Memory Debugging (valgrind, kmemleak, /proc/slabinfo)

Part XVDistributed Systems (Raft)

Ongaro & Ousterhout

  • §15.1Raft Consensus (leader election, log replication, safety)
  • §15.2Raft Practical Concerns (snapshot, membership change, log replay)
  • §15.3Performance Optimizations (pipelining, batching, 100K IOPS)

Part XVILoad Balancing & Consistent Hashing

Resume projects · DPDK LPM/ACL

  • §16.1Load Balancing Algorithms (RR, ECMP, consistent hashing)
  • §16.2NAT Gateway Internals (SNAT port selection, HA)
  • §16.3Session Synchronization (state machine replication, delta sync)

Appendix — Key Kernel Data Structures

StructureHeaderPurpose
struct task_structlinux/sched.hProcess descriptor
struct mm_structlinux/mm_types.hProcess address space
struct pagelinux/mm_types.hPhysical page frame
struct sk_bufflinux/skbuff.hNetwork packet
struct socknet/sock.hSocket state
struct net_devicelinux/netdevice.hNetwork interface
struct Qdiscnet/sch_generic.hTraffic control queue
struct neighbournet/neighbour.hARP/NDP entry
struct rtablenet/route.hIPv4 route cache entry
struct nf_connnet/netfilter/nf_conntrack.hConnection track entry
struct inodelinux/fs.hFile system inode
struct biolinux/bio.hBlock I/O unit
struct vm_area_structlinux/mm_types.hVMA — memory region