Back to Experience

Weenix

Jan 2025 – May 2025 Brown CS 1690
Weenix operating system illustration

As part of Brown University's renowned Operating Systems course (CS1690), I developed Weenix, a fully functional, Unix-like operating system. The semester-long project was divided into five major components, each building on the last to explore a fundamental layer of how an operating system works: Procs, Drivers, VFS, S5FS, and VM.

C Operating Systems Systems Programming Kernel Development

Procs (Processes and Threads)

The foundation of Weenix began with implementing kernel threads and process management. I built the scheduler, context switching, and basic synchronization primitives like mutexes and condition variables. This stage introduced the core concepts of concurrency and CPU scheduling, giving me hands-on insight into how an OS multiplexes the processor among multiple tasks.

Drivers (Device Drivers)

Next, I implemented device drivers for the keyboard, console, and timer hardware. This involved handling interrupts, writing low-level I/O routines, and exposing simple interfaces that higher layers of the kernel could call. Developing drivers made me appreciate the precision and discipline required to safely interact with hardware in a multitasking system.

VFS (Virtual File System)

The VFS layer unified access to different file systems through a common interface. I implemented inodes, dentries, and file objects — abstractions that allow uniform file operations regardless of the underlying storage system. This phase deepened my understanding of abstraction and modularity in kernel design.

S5FS (System V File System)

Building on the VFS foundation, I implemented a concrete disk-backed file system modeled after UNIX's System V. I handled file and directory creation, reading, writing, and deletion, as well as block allocation and inode management. Seeing data persist correctly across boots was one of the most satisfying moments of the project.

VM (Virtual Memory)

The final phase focused on virtual memory management. I implemented user address spaces, paging, and page fault handling to isolate processes and efficiently map virtual to physical memory. Completing this stage tied everything together — for the first time, user programs could safely execute on a multitasking operating system that I had developed from the ground up.

Reflection

Working on Weenix was one of the most challenging and rewarding experiences at Brown. Developing an operating system from the ground up allowed me to gain a deep understanding of what actually happens under the hood — from how a process is created and scheduled, to how memory is managed and files are read from disk.

The project taught me the importance of careful memory management, understanding system architecture, and debugging complex concurrent systems. After every crash, segfault, and kernel panic, it was incredibly rewarding to see everything come together and finally be able to print: "Hello, world!"

Hello World output from Weenix