CS 561 — Adv. Linux Kernel Programming
Advanced operating systems topics.
-
Introduction to Linux Kernel & Developer Tools
Understand why the Linux kernel matters, how its open-source development model works, and gain hands-on familiarity with the essential tools—git, make, cscope, ctags, and tmux—that every kernel developer relies on to navigate, build, and modify 27+ million lines of kernel source.
-
Isolation and System Calls
Learn how the Linux kernel isolates user processes from each other and from kernel space using CPU privilege rings, and how system calls provide the controlled gateway between user programs and kernel services.
-
Kernel Data Structures I: Lists, Hash Tables, and Red-Black Trees
Explores the Linux kernel's idiomatic data structures — the circular doubly linked list, fixed-size hash table, and red-black tree — focusing on the embedded-node design pattern and the APIs used throughout real kernel code.
-
Memory Allocation, Advanced Data Structures, and Kernel Modules
Learn how the kernel allocates memory with kmalloc and vmalloc, explore advanced data structures (radix tree, XArray, bitmap), and write your first loadable kernel module.
-
Kernel Debugging Techniques
Master the essential tools for debugging Linux kernel code: printk logging, assertion macros, kernel panic analysis, and interactive source-level debugging with QEMU and GDB.
-
Process Management
Explore how the Linux kernel represents, creates, and terminates processes through the task_struct descriptor. Covers process states, Copy-on-Write fork, threads-as-processes, kernel threads, and the zombie/reparenting lifecycle.
-
Linux Process Scheduler
Explore how the Linux kernel decides which process runs next, when, and for how long — from scheduling policies and priority to the Completely Fair Scheduler's proportional CPU-time design and the modular scheduler-class architecture.
-
Process Scheduling: CFS Deep Dive, Real-Time Policies, and EEVDF
Explores the internals of Linux CFS — virtual runtime, rb-tree process selection, and the scheduler entry point — then covers real-time scheduling policies (SCHED_FIFO, SCHED_RR, SCHED_DEADLINE), multi-core load balancing, context switching, and the modern EEVDF scheduler.
-
Kernel Tracing, eBPF, and Interrupt Handling
Learn to instrument the kernel with kprobes and eBPF for live tracing and performance analysis, then explore how Linux handles hardware and software interrupts through the IDT, ISRs, and the top-half/bottom-half split.
-
Interrupt Bottom Halves: Softirqs, Tasklets, and Work Queues
Explores how Linux defers non-urgent interrupt work using three mechanisms—softirqs, tasklets, and work queues—explaining the trade-offs between interrupt context and process context execution.
-
Kernel Synchronization I: Atomic Operations and Spinlocks
Explores why the kernel needs synchronization, how race conditions arise, and the two foundational primitives—atomic operations and spinlocks—that protect shared data in SMP and interrupt contexts.
-
Kernel Synchronization II: Sleeping Locks, Seqlocks, and Memory Barriers
Extends kernel synchronization beyond spinlocks to cover reader-writer locks, semaphores, mutexes, completion variables, sequential locks, preemption disabling, and memory ordering barriers — the full toolkit for writing correct, scalable concurrent kernel code.
-
Kernel Synchronization III: Seqlocks, Barriers, and RCU
Covers the remaining synchronization primitives in the Linux kernel—completion variables, seqlocks, preemption disabling, memory ordering barriers, and the highly scalable Read-Copy-Update (RCU) mechanism—explaining when and why to choose each.
-
Timer and Time Management
Explores how the Linux kernel tracks time using jiffies and hardware clocks, and how to schedule deferred work using kernel timers and delay mechanisms.
-
OS Virtualization
Explores how hypervisors and virtual machines isolate multiple operating systems on a single physical machine. Covers the x86 virtualization challenge, CPU/memory/I/O virtualization techniques, Intel VT-x, KVM, and OS-level containers.
-
Memory Management
Covers how the Linux kernel manages physical and virtual memory: pages, zones, the buddy allocator, gfp_t flags, kmalloc/vmalloc, the slab allocator, and per-CPU data structures.
-
Process Address Space
Explore how Linux manages per-process virtual memory through page tables, memory descriptors (mm_struct), and Virtual Memory Areas (vm_area_struct). Understand how the kernel creates, shares, and tears down address spaces across processes and threads.
-
The Virtual File System (VFS)
Explore how Linux's VFS layer abstracts multiple concrete filesystems behind a unified interface, and understand the four core kernel objects — superblock, inode, dentry, and file — that make this abstraction work.
-
Page Cache and Page Fault
Explore how Linux caches disk data in physical memory to slash I/O overhead, how the two-list eviction strategy avoids LRU pitfalls, and how the kernel handles page faults for file-backed, anonymous, and copy-on-write mappings.
-
File Systems and Block I/O
Trace the evolution from UFS to ext4 and learn how the Linux block I/O layer — sectors, buffers, bio structures, request queues, and I/O schedulers — turns high-level file operations into efficient disk accesses.