os-kernel
Design and analyze operating system internals — process management, memory management, file systems, scheduling, system calls, concurrency — with explicit resource accounting and failure boundaries.
Goals
- Understand OS abstractions and their implementation trade-offs
- Design system interfaces that are minimal and composable
- Plan for concurrency, scheduling, and resource isolation
- Debug OS-level issues systematically
Contract
Input
An OS concept or problem: scheduling, memory management, I/O, concurrency.
Output
A design or analysis document with:
- OS mechanism description
- Trade-off analysis (performance vs. fairness vs. complexity)
- Implementation considerations
- References to real systems (Linux, BSD, RTOS)
Core Subsystems
| Subsystem |
Responsibility |
Key algorithms |
| Process management |
Create, schedule, terminate |
O(1) scheduler, CFS, EDF |
| Memory management |
Allocate, virtualize, protect |
Paging, slab allocator, GC |
| File system |
Persist, organize, retrieve |
Ext4, Btrfs, ZFS, FUSE |
| I/O |
Device abstraction, buffering |
Polling, interrupts, DMA |
| Concurrency |
Synchronization, IPC |
Mutex, semaphores, RCU |
Steps
- Define the abstraction — what does the OS expose to programs
- Analyze trade-offs — performance, fairness, complexity, power
- Compare implementations — how does Linux, BSD, or an RTOS do it
- Design the interface — system call design, ioctl conventions
- Consider security — privilege levels, isolation, capability model
- Test edge cases — race conditions, deadlock, resource exhaustion
References
../networking/networking/SKILL.md — OS networking stack
../compilers/compilers/SKILL.md — code generation for OS targets
../../cs/cs-algorithms/SKILL.md — scheduling, memory algorithms
1---2name: os-kernel3description: Design and analyze operating system internals — process management, memory management, file systems, scheduling, system calls, concurrency — with explicit resource accounting and failure boundaries.4---56# os-kernel78Design and analyze operating system internals — process management, memory management, file systems, scheduling, system calls, concurrency — with explicit resource accounting and failure boundaries.910## Goals11- Understand OS abstractions and their implementation trade-offs12- Design system interfaces that are minimal and composable13- Plan for concurrency, scheduling, and resource isolation14- Debug OS-level issues systematically1516## Contract1718### Input19An OS concept or problem: scheduling, memory management, I/O, concurrency.2021### Output22A design or analysis document with:23- OS mechanism description24- Trade-off analysis (performance vs. fairness vs. complexity)25- Implementation considerations26- References to real systems (Linux, BSD, RTOS)2728## Core Subsystems2930| Subsystem | Responsibility | Key algorithms |31|---|---|---|32| Process management | Create, schedule, terminate | O(1) scheduler, CFS, EDF |33| Memory management | Allocate, virtualize, protect | Paging, slab allocator, GC |34| File system | Persist, organize, retrieve | Ext4, Btrfs, ZFS, FUSE |35| I/O | Device abstraction, buffering | Polling, interrupts, DMA |36| Concurrency | Synchronization, IPC | Mutex, semaphores, RCU |3738## Steps39401. **Define the abstraction** — what does the OS expose to programs412. **Analyze trade-offs** — performance, fairness, complexity, power423. **Compare implementations** — how does Linux, BSD, or an RTOS do it434. **Design the interface** — system call design, ioctl conventions445. **Consider security** — privilege levels, isolation, capability model456. **Test edge cases** — race conditions, deadlock, resource exhaustion4647## References48- `../networking/networking/SKILL.md` — OS networking stack49- `../compilers/compilers/SKILL.md` — code generation for OS targets50- `../../cs/cs-algorithms/SKILL.md` — scheduling, memory algorithms