Skip to main content
A minimal, educational bare-metal OS targeting the ARM Cortex-A8. It implements preemptive round-robin scheduling, hardware IRQ-driven context switching, and a no-libc standard library — all from scratch.

Quickstart

Build and run the OS in QEMU in under five minutes

Architecture

How the kernel, scheduler, and processes fit together

OS Internals

Process management, scheduling, and context switching

Platform Support

Configure for BeagleBone Black or QEMU

Library Reference

PRINT, READ, string, and numeric utilities

Add a Process

Step-by-step guide to adding your own user process

How it works

1

Boot

The ARM vector table in root.s sets up SVC and IRQ stacks, configures VBAR, and calls main() in the OS.
2

Process initialization

The OS initializes three processes (OS, P1, P2) with separate memory regions defined in the linker script, then enqueues P1 and P2 into the ready queue.
3

Timer starts

timer_init() programs the hardware timer to fire periodic IRQs. enable_irq() unmasks interrupts — scheduling begins.
4

Preemptive scheduling

On each timer IRQ, the CPU saves all registers of the current process into its PCB, calls schedule() to pick the next process, and restores its registers before returning.

Supported platforms

PlatformTargetTimerUART
BeagleBone BlackTARGET=beagleDMTIMER2 @ 0x48040000UART0 @ 0x44E09000
QEMU versatilepbTARGET=qemuSP804 @ 0x101e2000PL011 @ 0x101f1000

Build docs developers (and LLMs) love