Other

frostbyte

x86_64 OS kernel in C and assembly

An operating system kernel for x86_64 processors, written in C and assembly. It boots in the QEMU emulator, manages memory, switches between tasks and runs programs in user mode.

frostbyte

About the project

frostbyte is an operating system kernel for the x86_64 architecture, written from scratch in C and assembly and run in the QEMU emulator. It boots via Multiboot2, the standard protocol a bootloader uses to hand control to a kernel, then switches to 64-bit mode with its own page tables (the structures that map memory addresses). It has a preemptive scheduler, which switches the processor between tasks on its own, and runs programs in ring 3, the least privileged processor mode.

The challenge

An operating system kernel written from scratch is a project that forgives nothing: one wrong bit in a page table and the machine simply resets, with no message. The goal was to get all the way from the bootloader to running programs in user mode.

What we did

  1. 01

    Booting via Multiboot2 and switching the processor to 64-bit mode

  2. 02

    Its own page tables and memory management

  3. 03

    A preemptive scheduler that switches between tasks

  4. 04

    Running programs in ring 3, that is in user mode

  5. 05

    The kernel boots in the QEMU emulator

Describe your project.

A free quote comes back within an hour during working hours.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.