Sirui Chen·sirui.dev

Project

PennOS — A Unix-Like Educational OS

Shell, scheduler, signals, and a FAT-style filesystem written in C.

COperating SystemsShellsSchedulingSignalsFilesystems

Overview

C implementation of Unix-like OS features: shell commands, process scheduling, signal handling, and a PennFAT filesystem with full error-path testing.

Problem

Course-scale operating systems are unforgiving — invalid input, partial writes, or signal races corrupt processes and on-disk state. The challenge was building OS components that behave predictably under all of that.

What I built

Implemented core OS primitives in C with explicit error handling on every system-call boundary: a custom shell, a process scheduler with signal-driven lifecycle, file operations against a PennFAT on-disk format, and targeted tests on the edge paths.

Architecture

  • Shell — parser plus built-in commands and job control
  • Scheduler — priority-based context switching with signal-driven preemption
  • PennFAT — FAT-style filesystem with explicit superblock, FAT table, and directory entries
  • Process model — fork / exec / wait semantics with signal handlers and zombie reaping

Technical highlights

  • Wrote defensive systems code for the process lifecycle and file-operation edge cases, with emphasis on predictable behavior under invalid input.
  • Designed the on-disk PennFAT layout and the in-memory data structures that back its operations.
  • Tested error paths explicitly rather than only the happy paths.

Impact

  • Built a small but realistic OS kernel surface area, exercising scheduling, signals, and filesystem code under hostile inputs.