TRACK A OS KERNEL PROJECTS
This is the hard mode track for good reason. These projects will take you from observing the kernel from userspace to actually writing code that runs in kernel space.
Operating Systems & Kernel Development â Learning Projects
Track A: Hard Mode â For kernel dev, OS teams, hypervisor/virtualization, cloud infra internals
This is the âhard modeâ track for good reason. These projects will take you from observing the kernel from userspace to actually writing code that runs in kernel space.
Core Concept Analysis
The topics in this track form an interconnected system. Hereâs how they relate:
| Concept | What You Need to Understand |
|---|---|
| Syscall paths | How control transfers from user code â kernel â back, the syscall table, context switching overhead |
| Process lifecycle | fork/exec/wait, process states (running, sleeping, zombie), exit, process hierarchy |
| Virtual memory | Page tables, address spaces, memory mapping, copy-on-write, demand paging |
| Page faults | Major vs minor faults, fault handlers, memory-mapped files, swapping |
| Scheduling | Run queues, time slices, priorities, preemption, scheduler classes (CFS, RT) |
| Interrupts | Hardware interrupts, interrupt handlers, top/bottom halves, softirqs |
| Device drivers | Character vs block devices, file_operations, ioctl, kernel APIs |
| Kernel/user boundary | Protection rings, privilege levels, copying data across boundary |
| OS-level locks | Spinlocks, mutexes, semaphores, RCU, lock ordering, deadlock prevention |
Project 1: Syscall Tracer (strace clone)
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 3: Advanced
- Knowledge Area: OS Internals / Debugging
- Software or Tool: ptrace
- Main Book: âThe Linux Programming Interfaceâ by Michael Kerrisk
What youâll build: A tool that intercepts and logs every system call a program makes, showing the syscall name, arguments, and return values in real-time.
Why it teaches OS internals: Building strace forces you to understand the exact boundary between user and kernel space. Youâll use ptrace() to stop a process at every syscall, decode the syscall number from registers, and understand how arguments are passed. This is the single best way to see the kernel/user boundary in action.
Core challenges youâll face:
- Decoding syscall numbers to names (maps to syscall table structure)
- Reading arguments from registers and memory (maps to calling conventions, kernel/user boundary)
- Handling multi-threaded programs (maps to process lifecycle, threading model)
- Following child processes through fork/exec (maps to process lifecycle)
- Dealing with restartable syscalls after signals (maps to interrupt handling)
Resources for key challenges:
- âThe Linux Programming Interfaceâ by Michael Kerrisk (Ch. 26: Process Tracing) - The definitive guide to ptrace
- âComputer Systems: A Programmerâs Perspectiveâ by Bryant & OâHallaron (Ch. 8) - Exception control flow and syscalls
Key Concepts:
- ptrace mechanism: âThe Linux Programming Interfaceâ Ch. 26 - Michael Kerrisk
- x86-64 calling conventions: âComputer Systems: A Programmerâs Perspectiveâ Ch. 3 - Bryant & OâHallaron
- Syscall tables: Linux kernel source
arch/x86/entry/syscalls/syscall_64.tbl - Process states: âOperating Systems: Three Easy Piecesâ Ch. 4 - Arpaci-Dusseau
Difficulty: Intermediate Time estimate: 2-3 weeks Prerequisites: C programming, basic understanding of processes, comfort reading man pages
Real world outcome:
- Run
./mystrace ls -laand see every syscall:open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3 - Output should be readable like real strace, showing timing, arguments, return codes
- Can trace any program on your system and understand what itâs actually doing
Learning milestones:
- Successfully intercept and print syscall numbers â You understand the ptrace state machine
- Decode arguments including strings and structs â You understand memory layout and kernel/user data transfer
- Handle fork/exec and follow children â You understand process lifecycle deeply
- Support multi-threaded programs â You understand the relationship between processes and threads at OS level
Project 2: Memory Allocator (malloc/free from scratch)
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 1. The âResume Goldâ
- Difficulty: Level 3: Advanced
- Knowledge Area: Memory Management / Systems Programming
- Software or Tool: sbrk / mmap
- Main Book: âComputer Systems: A Programmerâs Perspectiveâ by Bryant & OâHallaron
What youâll build: A complete memory allocator that replaces malloc/free, using only brk() and mmap() syscalls, with visual debugging output showing heap state.
Why it teaches OS internals: malloc is the interface between your program and the kernelâs virtual memory system. By implementing it, youâll understand why the heap exists, how the kernel grows your address space, the difference between virtual and physical memory, and why memory fragmentation happens.
Core challenges youâll face:
- Managing the program break with
brk()/sbrk()(maps to virtual memory, syscalls) - Using
mmap()for large allocations (maps to virtual memory, page faults) - Implementing free lists and coalescing (maps to memory management algorithms)
- Handling alignment requirements (maps to hardware memory model)
- Debugging memory corruption (maps to understanding address space layout)
Resources for key challenges:
- âComputer Systems: A Programmerâs Perspectiveâ Ch. 9.9 - Detailed malloc implementation walkthrough
- âOperating Systems: Three Easy Piecesâ Ch. 17 - Free space management
Key Concepts:
- Virtual address space layout: âComputer Systems: A Programmerâs Perspectiveâ Ch. 9 - Bryant & OâHallaron
- Free list management: âOperating Systems: Three Easy Piecesâ Ch. 17 - Arpaci-Dusseau
- mmap syscall: âThe Linux Programming Interfaceâ Ch. 49 - Michael Kerrisk
- Memory alignment: âC Interfaces and Implementationsâ Ch. 5 - David Hanson
Difficulty: Intermediate Time estimate: 2-3 weeks Prerequisites: C, pointers, basic understanding of processes
Real world outcome:
LD_PRELOAD=./mymalloc.so ./some_program- Replace system malloc with yours- Visual heap dump:
[BLOCK 0x1000: 64 bytes USED] [BLOCK 0x1040: 128 bytes FREE] ... - Run benchmarks comparing your allocator to glibc malloc
- Successfully run complex programs (even a shell) using your allocator
Learning milestones:
- Basic allocation with brk works â You understand heap growth and the program break
- Free works with coalescing â You understand fragmentation and metadata management
- mmap for large allocations â You understand different memory mapping strategies
- Can run real programs â Youâve built something production-quality
Project 3: Process Scheduler Visualization Tool
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 3: Genuinely Clever
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 3: Advanced
- Knowledge Area: OS Scheduler / Kernel Internals
- Software or Tool: Linux Scheduler (CFS)
- Main Book: âLinux Kernel Developmentâ by Robert Love
What youâll build: A tool that visualizes the Linux scheduler in real-time, showing which processes are running on which CPUs, context switches, runqueue depth, and scheduling decisions.
Why it teaches OS internals: The scheduler is the heart of the OS. By building a tool to observe it, youâll learn how the kernel decides what runs, why processes get preempted, and how modern schedulers balance fairness with performance.
Core challenges youâll face:
- Reading scheduler data from
/procand tracefs (maps to kernel/user data interfaces) - Understanding CFS vruntime and load balancing (maps to scheduling algorithms)
- Tracking context switches in real-time (maps to process lifecycle, interrupts)
- Correlating CPU time with priority (maps to scheduler internals)
- Visualizing multi-core scheduling (maps to SMP considerations)
Resources for key challenges:
- âOperating Systems: Three Easy Piecesâ Ch. 7-10 - Scheduling chapters
- âLinux Kernel Developmentâ by Robert Love Ch. 4 - CFS scheduler deep dive
Key Concepts:
- Completely Fair Scheduler (CFS): âLinux Kernel Developmentâ Ch. 4 - Robert Love
- Process states and transitions: âOperating Systems: Three Easy Piecesâ Ch. 4 - Arpaci-Dusseau
- /proc filesystem: âThe Linux Programming Interfaceâ Ch. 12 - Michael Kerrisk
- CPU affinity: âThe Linux Programming Interfaceâ Ch. 35 - Michael Kerrisk
Difficulty: Intermediate Time estimate: 2 weeks Prerequisites: C, understanding of basic scheduling concepts
Real world outcome:
- Terminal UI showing real-time CPU utilization per core with process names
- Timeline view showing context switches:
[CPU0: nginx(1234) â postgres(5678) â nginx(1234)] - Statistics: context switches/sec, average time slice, runqueue depth
- Can identify scheduling problems: âProcess X is getting starved becauseâŚâ
Learning milestones:
- Read and parse /proc/schedstat â You understand kernel-exported scheduler data
- Visualize context switches â You understand preemption and time slicing
- Track vruntime progression â You understand CFS fairness model
- Correlate with CPU affinity â You understand multi-core scheduling
Project 4: Page Fault Analyzer
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 4: Expert
- Knowledge Area: Virtual Memory / Kernel Tracing
- Software or Tool: perf_event_open
- Main Book: âOperating Systems: Three Easy Piecesâ by Arpaci-Dusseau
What youâll build: A tool that monitors page faults in running programs, distinguishing major from minor faults, showing which virtual addresses faulted, and mapping faults to source code locations.
Why it teaches OS internals: Page faults are where virtual memory becomes real. By observing them, youâll understand demand paging, copy-on-write, memory-mapped files, and why adding RAM sometimes doesnât help performance.
Core challenges youâll face:
- Using
perf_event_open()to capture page faults (maps to kernel tracing interfaces) - Distinguishing major vs minor faults (maps to page fault types, I/O)
- Correlating fault addresses with memory regions from
/proc/pid/maps(maps to virtual memory layout) - Understanding COW and lazy allocation (maps to memory optimization strategies)
- Symbolizing addresses to function names (maps to debugging/profiling)
Resources for key challenges:
- âOperating Systems: Three Easy Piecesâ Ch. 21-23 - Virtual memory and paging
- âComputer Systems: A Programmerâs Perspectiveâ Ch. 9 - Virtual memory
Key Concepts:
- Page fault handling: âOperating Systems: Three Easy Piecesâ Ch. 21 - Arpaci-Dusseau
- Memory mapping: âThe Linux Programming Interfaceâ Ch. 49 - Michael Kerrisk
- perf_event_open: man page + kernel documentation
- /proc/pid/maps format: âThe Linux Programming Interfaceâ Ch. 48 - Michael Kerrisk
Difficulty: Advanced Time estimate: 2-3 weeks Prerequisites: C, understanding of virtual memory basics
Real world outcome:
./pagefault-analyzer ./my_program- Output shows:
MINOR fault at 0x7fff5a2b3000 (stack growth), MAJOR fault at 0x400000 (loading code from disk) - Heat map of which memory regions cause the most faults
- Can explain: âYour program has 10,000 major faults because itâs not pre-faulting the mmapâd fileâ
Learning milestones:
- Capture page faults with counts â You understand the basic fault mechanism
- Distinguish major/minor â You understand the role of disk I/O in paging
- Map to source regions â You understand address space layout in detail
- Give optimization advice â You can apply this knowledge to real performance problems
Project 5: Linux Kernel Module â Character Device Driver
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 4: Expert
- Knowledge Area: Kernel Development / Drivers
- Software or Tool: Linux Kernel Headers
- Main Book: âLinux Device Driversâ by Corbet, Rubini, Kroah-Hartman
What youâll build: A character device driver (/dev/mydevice) that implements a simple ring buffer in kernel space, accessible from userspace via read/write/ioctl.
Why it teaches OS internals: This is where you cross the boundary. Youâll write code that runs in kernel space, manage kernel memory, handle concurrent access, and understand why the kernel is designed the way it is.
Core challenges youâll face:
- Setting up kernel module build environment (maps to kernel build system)
- Implementing
file_operations(open, read, write, release, ioctl) (maps to VFS layer) - Managing kernel memory with kmalloc/kfree (maps to kernel memory management)
- Handling concurrent access with spinlocks/mutexes (maps to OS-level locks)
- Copying data between user and kernel space (maps to kernel/user boundary)
- Debugging without crashing your system (maps to kernel debugging)
Resources for key challenges:
- âLinux Device Driversâ by Corbet, Rubini, Kroah-Hartman (Ch. 3) - Character drivers
- âLinux Kernel Developmentâ by Robert Love - General kernel programming
Key Concepts:
- Kernel modules: âLinux Device Driversâ Ch. 2 - Corbet et al.
- Character devices: âLinux Device Driversâ Ch. 3 - Corbet et al.
- Kernel memory allocation: âLinux Kernel Developmentâ Ch. 12 - Robert Love
- Kernel synchronization: âLinux Kernel Developmentâ Ch. 10 - Robert Love
- copy_to_user/copy_from_user: âLinux Device Driversâ Ch. 3 - Corbet et al.
Difficulty: Advanced Time estimate: 3-4 weeks Prerequisites: Strong C, completed at least one userspace project above, comfortable with system crashes
Real world outcome:
insmod mydriver.koloads your moduleecho "hello" > /dev/mydevicewrites to kernel ring buffercat /dev/mydevicereads back (FIFO)./myctl --stats(via ioctl) shows buffer stats- Check
dmesgfor your kernel printk messages
Learning milestones:
- Module loads/unloads cleanly â You understand kernel module lifecycle
- Basic read/write works â You understand file_operations and the VFS
- Handle concurrent access â You understand kernel locking primitives
- ioctl implementation â You understand custom kernel-user interfaces
- Survives stress testing â Youâve written robust kernel code
Project 6: Userspace Thread Library (Green Threads)
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C / Assembly
- Coolness Level: Level 5: Pure Magic (Super Cool)
- Business Potential: 4. The âOpen Coreâ Infrastructure
- Difficulty: Level 5: Master
- Knowledge Area: OS Architecture / Concurrency
- Software or Tool: Context Switching
- Main Book: âOperating Systems: Three Easy Piecesâ by Arpaci-Dusseau
What youâll build: A cooperative threading library that implements thread creation, yielding, and a round-robin scheduler, entirely in userspace without kernel thread support.
Why it teaches OS internals: By building your own scheduler and context switching, youâll understand exactly what the kernel does thousands of times per second. The constraints of userspace threading also illuminate why kernel threads and preemption exist.
Core challenges youâll face:
- Saving and restoring CPU state (registers, stack pointer) (maps to context switching)
- Allocating and managing per-thread stacks (maps to memory management)
- Implementing a scheduler and run queue (maps to scheduling)
- Making it work with blocking I/O (maps to understanding blocking vs non-blocking)
- Signal handling with custom stacks (maps to interrupts, signals)
Resources for key challenges:
- âOperating Systems: Three Easy Piecesâ Ch. 26-28 - Concurrency introduction
- âComputer Systems: A Programmerâs Perspectiveâ Ch. 8 - Control flow
Key Concepts:
- Context switching: âOperating Systems: Three Easy Piecesâ Ch. 6 - Arpaci-Dusseau
- setjmp/longjmp: âC Programming: A Modern Approachâ Ch. 24 - K.N. King
- Stack management: âComputer Systems: A Programmerâs Perspectiveâ Ch. 3 - Bryant & OâHallaron
- Scheduling algorithms: âOperating Systems: Three Easy Piecesâ Ch. 7-9 - Arpaci-Dusseau
Difficulty: Advanced Time estimate: 2-3 weeks Prerequisites: Strong C, assembly basics, understanding of calling conventions
Real world outcome:
thread_create(worker_function, arg);
thread_create(another_worker, arg2);
scheduler_run(); // Runs both, switching on yield()
- Demo program with multiple threads printing interleaved output
- Can implement a simple cooperative web server using your threads
- Benchmark: show context switch overhead (nanoseconds)
Learning milestones:
- Basic context switch works â You understand what state defines a âthreadâ
- Multiple threads round-robin â You understand scheduling decisions
- Thread exit and cleanup â You understand resource management
- Works with real workloads â Youâve built something useful
Project 7: Interrupt Latency Profiler
- File: TRACK_A_OS_KERNEL_PROJECTS.md
- Programming Language: C
- Coolness Level: Level 4: Hardcore Tech Flex
- Business Potential: 3. The âService & Supportâ Model
- Difficulty: Level 4: Expert
- Knowledge Area: OS Performance / Kernel
- Software or Tool: ftrace / eBPF
- Main Book: âSystems Performanceâ by Brendan Gregg
What youâll build: A tool that measures and visualizes interrupt latency on your system, showing how long it takes from hardware interrupt to handler execution, and identifying sources of latency.
Why it teaches OS internals: Interrupts are how hardware talks to software. By measuring them, youâll understand interrupt handlers, top/bottom halves, interrupt masking, and why real-time systems are hard.
Core challenges youâll face:
- Accessing interrupt statistics from /proc/interrupts (maps to interrupt subsystem)
- Using ftrace to trace interrupt handlers (maps to kernel tracing)
- Understanding IRQ affinity and distribution (maps to SMP interrupt handling)
- Measuring time accurately at microsecond scale (maps to timekeeping)
- Correlating latency spikes with system activity (maps to system analysis)
Key Concepts:
- Interrupt handling: âLinux Kernel Developmentâ Ch. 7 - Robert Love
- Top/bottom halves: âLinux Kernel Developmentâ Ch. 8 - Robert Love
- ftrace: Kernel documentation + Steven Rostedtâs articles
- /proc/interrupts: âUnderstanding the Linux Kernelâ Ch. 4 - Bovet & Cesati
Difficulty: Advanced Time estimate: 2 weeks Prerequisites: Understanding of userspace profiling, basic kernel concepts
Real world outcome:
- Real-time display:
IRQ 16 (eth0): avg 2.3Îźs, max 150Îźs, count 45032/sec - Histogram of latencies per interrupt source
- Alert when latency exceeds threshold
- Can diagnose: âYour network latency spikes happen when IRQ 16 and IRQ 18 hit the same CPUâ
Learning milestones:
- Parse /proc/interrupts â You understand interrupt accounting
- Trace with ftrace â You understand kernel tracing infrastructure
- Measure latencies accurately â You understand timekeeping challenges
- Correlate with system events â You can debug real interrupt issues
Project Comparison Table
| Project | Difficulty | Time | Depth of Understanding | Fun Factor | Topics Covered |
|---|---|---|---|---|---|
| Syscall Tracer | Intermediate | 2-3 weeks | ââââ | âââââ | Syscalls, process lifecycle, kernel/user boundary |
| Memory Allocator | Intermediate | 2-3 weeks | ââââ | âââ | Virtual memory, page faults, syscalls |
| Scheduler Visualizer | Intermediate | 2 weeks | âââ | ââââ | Scheduling, process lifecycle |
| Page Fault Analyzer | Advanced | 2-3 weeks | âââââ | âââ | Virtual memory, page faults |
| Kernel Module | Advanced | 3-4 weeks | âââââ | âââââ | Device drivers, locks, kernel/user boundary |
| Thread Library | Advanced | 2-3 weeks | ââââ | ââââ | Scheduling, locks, process lifecycle |
| Interrupt Profiler | Advanced | 2 weeks | ââââ | âââ | Interrupts, scheduling |
Recommended Learning Path
Given this is âhard mode,â hereâs the progression I recommend:
Phase 1: Observe the Kernel from Outside (Weeks 1-5)
- Syscall Tracer - Start here. Itâs the best way to see the kernel/user boundary without writing kernel code.
- Memory Allocator - Builds on syscall knowledge, teaches virtual memory deeply.
Phase 2: Understand Scheduling and Concurrency (Weeks 6-9)
- Thread Library - Forces you to implement what the scheduler does.
- Scheduler Visualizer - Now observe the real kernel scheduler with informed eyes.
Phase 3: Cross into Kernel Space (Weeks 10-15)
- Kernel Module - The real thing. Everything before this was preparation.
- Page Fault Analyzer - Combines userspace tooling with deep kernel knowledge.
- Interrupt Profiler - Capstone project tying it all together.
Final Comprehensive Project: Mini Operating System Kernel
What youâll build: A minimal operating system that boots on real hardware (or QEMU), implements protected mode, basic virtual memory with paging, a simple process model with context switching, a basic syscall interface, and a simple shell.
Why this is the ultimate project: This synthesizes everything. You canât fake understanding when youâre writing the code that sets up page tables, handles interrupts, and switches between processes.
Core challenges youâll face:
- Bootloader and protected mode setup (maps to hardware initialization)
- Setting up GDT, IDT, TSS (maps to x86 architecture)
- Implementing paging and virtual memory (maps to virtual memory internals)
- Writing interrupt handlers (maps to interrupts)
- Implementing basic syscalls (maps to syscall paths, kernel/user boundary)
- Context switching between processes (maps to scheduling, process lifecycle)
- Basic device drivers (keyboard, screen) (maps to device drivers)
- Kernel synchronization primitives (maps to OS-level locks)
Resources for key challenges:
- âOperating Systems: Three Easy Piecesâ - Conceptual foundation
- OSDev Wiki (wiki.osdev.org) - Practical x86 OS development
- âComputer Systems: A Programmerâs Perspectiveâ Ch. 9 - Virtual memory implementation
- James Molloyâs kernel tutorials - Step-by-step x86 kernel
Key Concepts:
- x86 protected mode: OSDev Wiki + Intel manuals
- Paging setup: âOperating Systems: Three Easy Piecesâ Ch. 18-20 - Arpaci-Dusseau
- Interrupt Descriptor Table: âComputer Systems: A Programmerâs Perspectiveâ Ch. 8 - Bryant & OâHallaron
- Context switching: âOperating Systems: Three Easy Piecesâ Ch. 6 - Arpaci-Dusseau
- System call implementation: âThe Linux Programming Interfaceâ Ch. 3 - Michael Kerrisk (for design)
Difficulty: Expert Time estimate: 2-3 months Prerequisites: All projects above, x86 assembly, strong C, patience
Real world outcome:
- Boot your OS in QEMU:
qemu-system-i386 -kernel myos.bin - See your kernel print âMyOS v0.1â
- Type commands in your shell
- Run multiple processes that time-slice
psshows running processes with PIDsmemshows memory map with page table info- Handle a page fault gracefully (not crash)
Learning milestones:
- Boot to protected mode â You understand x86 boot process
- Paging works, can map/unmap pages â You understand virtual memory at the hardware level
- Keyboard interrupt works â You understand interrupt handling
- Two processes context switch â You understand scheduling at the deepest level
- Syscalls work â You understand the complete kernel/user boundary
- Shell runs user programs â Youâve built an operating system
Final Notes
Why this order matters: Each project builds mental models that the next project requires. The syscall tracer shows you the boundary; the allocator makes you use it; the thread library makes you implement scheduling; the kernel module puts you on the other side; and the mini-OS makes you build the whole thing.
The reality check from your curriculum is accurate: This path has the highest prestige and highest difficulty. The jobs are fewer but theyâre the jobs that really matterâkernel teams at Linux distros, hypervisor teams at VMware/AWS/Google, OS teams at Apple/Microsoft, embedded systems, and security research.
Strong OSS signaling: Every one of these projects can go on GitHub. A working strace clone or kernel module demonstrates skills that canât be faked in an interview.
Start with the syscall tracer. When you can explain every line of output from strace ls, youâre ready for the rest.