Pebbles Kernel

x86 Kernel supporting device drivers, preemptive multitasking, virtual memory protection, threading, and virtual terminals. Written from scratch for CMU 15-410.


During the spring semester of 2020, along with a partner, I wrote an x86 kernel supporting most features necessary for a multitasking OS. We implemented the kernel from scratch in C and x86 assembly.

Features:

  • Keyboard, timer, and terminal device drivers
  • User/kernel space division and syscall interface
  • Process and thread management with fork/exec/wait/thread_fork/exit
  • Per-process virtual memory protection with page tables
  • Preemptive multitasking and scheduler including preemptible syscalls
  • Atomics and synchronization primitives
  • User-space threading library
  • Virtual/multiplexed terminal devices
  • Runs on real hardware
  • A few concurrency bugs, but at least they didn’t show up…

Unfortunately, booting it up again would take some build system work that I don’t feel like doing.

However, I found an old work-in-progress screenshot, running on an i5-6400:

kernel shell

Written on June 22, 2021