← Christopher Yarbro

Weenix

A UNIX-like operating system kernel in C, built up from a bare skeleton to one that runs a shell and user programs.

COperating Systems courseCode private (course policy)

Weenix is the teaching kernel from Brown University's operating systems course. The skeleton boots; everything that makes it an operating system is written by the student. Course policy keeps the code private, so this page describes the design instead.

Processes and threads

Process creation and teardown, kernel threads, a cooperative scheduler with run queues, and the synchronization primitives everything else builds on: mutexes and wait queues.

Drivers

A TTY driver with line discipline for terminal input, plus the block and memory device interfaces the filesystem sits on.

Virtual file system

The VFS layer gives every filesystem the same interface: vnodes, path resolution, file descriptors, and the system calls on top of them (open, read, write, mkdir, link, rename, and so on).

System V filesystem

An on-disk filesystem (S5FS) under the VFS: inodes, direct and indirect blocks, directories, with disk blocks cached in memory between the filesystem and the disk driver.

Virtual memory

Per-process address spaces, page-fault handling, mmap, and fork with copy-on-write through shadow memory objects, so a forked child shares pages with its parent until one of them writes.