Skip to content
Joseph Bettini edited this page Mar 16, 2026 · 18 revisions

K1tox: Kernel From Scratch (x86_32)

Welcome to the official documentation :). This project is a deep dive into the x86_32 architecture. Our objective is to build a kernel starting from a simple "Hello World" to a fully functional, protected-mode distribution.

Project Vision

k1tox is more than just a hobby project; it is an educational journey into kernel engineering. Our goal is to master the x86_32 architecture by implementing modern features to bridge the gap between theoretical OS concepts and real-world implementation.

Key Features

  • Layered Allocator: A complete system featuring a Buddy Allocator (physical), Slab Allocator (object caching), and Vmalloc/Kmap for virtual memory flexibility.
  • Higher-Half Kernel: Mapped at 0xC0000000 to provide a clean and professional address space layout.
  • Copy-On-Write (COW): Efficient memory management for process forking.
  • Single-Core Architecture: A uniprocessor (UP) design focusing on the core mechanics of context switching without the overhead of multi-core complexity.
  • Preemptive Multitasking: Although the system is single-threaded per process, it uses a timer-driven preemption to swap tasks automatically and simulate parallel execution.
  • Scheduling Research: Scheduling Research: A modular multitasking core using FCFS, Round Robin, and MLFQ algorithms.
  • Device Drivers: Multiple integrated drivers including VGA, Keyboard (PS/2), and TTY management.

References & Inspiration

The development of k1tox is guided by the industry's most trusted academic and community resources:

  • The Linux Kernel: Our ultimate reference for monolithic design. We study its source code to understand how complex subsystems like are handled in a production-grade environment.
  • OSDev Wiki: Our primary source for the details of x86 hardware and low-level implementation.
  • Operating System Concepts (9th Edition): The "Dinosaur Book", our theoretical guide.

Summary: From Zero to Distro

  • I. Introduction - The host requierements
  • II. A Pimped Hello World – Multiboot2 configuration and implementation of a minimal driver stack (VGA, Keyboard, TTY) to power a micro-shell from the very first boot.
  • III. The Global Descriptor Table (GDT) – Defining kernel segments, configuring privilege levels, and ensuring a clean transition to protected

Clone this wiki locally