Skip to content
Oguzhan KAYNAK edited this page Dec 3, 2026 · 13 revisions

atlOS

atlOS is an experimental x86_64 operating system written in C++17, built for learning and research. GRUB2 boots it (multiboot2) into a higher half kernel that is small enough to read end to end.

Screens

After boot the shell clears the screen and shows the version, the free memory and the mounted disks:

atlOS after boot

A shell session: the user programs on the disk, one of them running in ring 3, the scheduler's tasks and the page table mappings:

The atlOS shell

Both are the VGA text screen in QEMU, taken with scripts/take-screenshots.py; the same output goes to the serial port.

What works today

  • 64-bit higher half kernel (loaded at 4 MB, mapped at 0xFFFFFFFF80000000)
  • GDT with a TSS (double fault stack), IDT, decoded exception reports with a backtrace
  • ACPI tables (RSDP, XSDT/RSDT, MADT); interrupts through the local APIC and the I/O APIC, a 1 ms tick from the APIC timer; the 8259 PIC and the PIT without ACPI, behind the same driver interfaces
  • Physical memory manager (2 MB blocks, 4 KB frames for page tables)
  • Virtual memory with 2 MB pages, a physmap of all physical memory, an address space per user program
  • A heap of its own (free list, first fit), shared by the kernel (kmalloc, new) and user programs (malloc, new)
  • Cooperative round robin scheduler over one list of every thread (no limit but memory): yield, sleep, block / unblock, exit codes and wait, an idle thread, CPU time per thread
  • Processes and threads: a process owns the address space, the files and the heap, its threads run; thread ids with the pid in the upper half, user stacks with guard pages; the end of the main thread or a fault ends every thread
  • Synchronization: atomics, wait queues, semaphores, mutexes, condition variables
  • PS/2 keyboard and serial input; a kernel shell with file, memory (md, mw, vmmap, pt), task, CPU (cr, rdmsr, gdt, idt) and device (in, out, irq, int, disk read, lspci, acpi, apic, smbios) commands
  • User programs in C++17, in ring 3 from the disk (ELF64, int 0x80 system calls for the keyboard, the screen, files, time and threads, argc/argv), see User Programs
  • PCI and PCIe: every bus scanned, BARs and capabilities
  • SMBIOS 2.x: the BIOS, system, board, processor and memory modules
  • ATA disks (PIO), MBR partitions, FAT16 (read and write) and a VFS (/disk0/...)
  • Console on COM1 and the VGA text screen, a small freestanding libc
  • 960 in-kernel self test checks (with a test disk), a crash test and a shell test over the serial port, run headless in CI

Latest release: 0.7.0 (changelog).

Pages

Page About
Getting Started toolchain, build, run, debug
Architecture boot flow, address space, interrupts, source layout
Memory Management PMM, VMM, heap
Scheduler and Threads the cooperative scheduler and its API
User Programs processes, threads and programs in ring 3
Drivers and Console interrupt controller, timer, serial port, VGA console
Self Tests running and writing the in-kernel tests
Code Style and Design WebKit style, clang-tidy, the object/DI design

The wiki gives the overview. The detailed, versioned documentation lives in the repository under docs/ and is updated together with the code.

Clone this wiki locally