# phil-opp/blog_os

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/phil-opp-blog-os).**

17,518 stars · 1,204 forks · HTML · Apache-2.0

## Links

- GitHub: https://github.com/phil-opp/blog_os
- Homepage: http://os.phil-opp.com
- awesome-repositories: https://awesome-repositories.com/repository/phil-opp-blog-os.md

## Topics

`kernel` `operating-system` `rust` `x86-64`

## Description

This project is a freestanding kernel written in Rust that boots on x86 hardware without a standard library. It serves as a low-level system implementation focusing on the creation of a bare metal operating system.

The system implements a bootable disk image toolchain that transforms source code into binaries compatible with a bootloader. It features a custom memory allocator for dynamic memory management and an x86 kernel implementation that includes paging, interrupt handling, and VGA text mode.

The project covers several core capability areas, including low-level memory management through paging and frame allocation, CPU interrupt handling for exception management, and the development of a multitasking system using asynchronous execution patterns. It also provides a workflow for building freestanding binaries, managing build environments via containers, and verifying kernel logic through integration tests.

The compiled disk images can be executed on physical hardware via USB drives or run within virtual machines and emulators for testing.

## Tags

### Operating Systems & Systems Programming

- [Bare Metal Development](https://awesome-repositories.com/f/operating-systems-systems-programming/systems-programming/bare-metal-development.md) — Creates freestanding binaries that boot and execute directly on x86 hardware without an underlying operating system. ([source](https://github.com/phil-opp/blog_os#readme))
- [Freestanding Kernels](https://awesome-repositories.com/f/operating-systems-systems-programming/systems-programming/bare-metal-development/freestanding-kernels.md) — Implements a freestanding kernel written in Rust that boots on x86 hardware without a standard library.
- [Interrupt Handling](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/interrupt-handling.md) — Uses a processor descriptor table to capture hardware interrupts and CPU exceptions.
- [Kernel Development](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/kernel-development.md) — Provides the complete workflow for building operating system kernels and bootloaders from scratch.
- [Custom Memory Allocators](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/custom-memory-allocators.md) — Implements a custom heap allocator for dynamic memory management in a freestanding environment.
- [System Memory Allocation](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/allocation-strategies/dynamic-memory-allocation/system-memory-allocation.md) — Implements paging, frame allocation, and system-level memory abstractions during kernel initialization. ([source](https://github.com/phil-opp/blog_os#readme))
- [Operating System Development](https://awesome-repositories.com/f/operating-systems-systems-programming/operating-system-development.md) — Implements the core processes of designing and building a multitasking operating system from the kernel up. ([source](https://github.com/phil-opp/blog_os#readme))
- [Operating System Kernel Build Tools](https://awesome-repositories.com/f/operating-systems-systems-programming/operating-system-kernel-build-tools.md) — Provides a toolchain for compiling a minimal operating system kernel and binary without a standard library. ([source](https://github.com/phil-opp/blog_os/blob/main/README.md))
- [Paged Memory Management](https://awesome-repositories.com/f/operating-systems-systems-programming/paged-memory-management.md) — Maps virtual addresses to physical memory frames using a hierarchical page table structure.
- [x86 Kernel Implementations](https://awesome-repositories.com/f/operating-systems-systems-programming/x86-kernel-implementations.md) — Implements core x86 system functionality including paging, interrupt handling, and VGA text mode.
- [Bootable Disk Image Toolchains](https://awesome-repositories.com/f/operating-systems-systems-programming/bootable-disk-image-toolchains.md) — Provides a build toolchain that transforms Rust source code into binaries compatible with a bootloader for physical or emulated hardware.
- [Binary Layout Formatting](https://awesome-repositories.com/f/operating-systems-systems-programming/disk-image-format-manipulation/binary-layout-formatting.md) — Organizes compiled binaries into a binary structure that bootloaders can identify and load.
- [Hardware Text Buffers](https://awesome-repositories.com/f/operating-systems-systems-programming/hardware-text-buffers.md) — Implements screen output by writing characters directly to hardware-specific VGA text buffers. ([source](https://github.com/phil-opp/blog_os/blob/main/README.md))
- [Bootable Disk Layouts](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/boot-startup-management/disk-image-bootloaders/bootable-disk-layouts.md) — Implements the formatting of binaries into specific disk image layouts compatible with bootloaders.
- [Bootable Image Creation](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/boot-startup-management/disk-image-bootloaders/bootable-image-creation.md) — Formats compiled kernels into disk images that can be loaded onto hardware or emulators. ([source](https://github.com/phil-opp/blog_os/tree/post-02))
- [OS Image Execution](https://awesome-repositories.com/f/operating-systems-systems-programming/os-image-execution.md) — Runs compiled disk images in emulators or boots them on physical hardware. ([source](https://github.com/phil-opp/blog_os/tree/post-10))
- [Boot Image Generation](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/base-image-distributions/customized-installation-media/boot-image-generation.md) — Generates complete bootable disk images tailored for x86 architecture to be written to physical storage. ([source](https://github.com/phil-opp/blog_os/tree/post-02))
- [VGA Text Mode Drivers](https://awesome-repositories.com/f/operating-systems-systems-programming/vga-text-mode-drivers.md) — Controls the display by writing characters directly to the VGA text buffer memory addresses.
- [Hardware Emulators](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/hardware-emulators.md) — Uses hardware emulators to simulate physical components for testing kernel behavior and boot images.
- [Floppy Disk Emulation](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/hardware-emulators/floppy-disk-emulation.md) — Executes compiled disk images within virtual machines to test kernel behavior. ([source](https://github.com/phil-opp/blog_os/tree/post-03))
- [System Emulators](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/hardware-emulators/hardware-interface-emulators/system-emulators.md) — Launches compiled disk images in virtual machines to test kernel behavior. ([source](https://github.com/phil-opp/blog_os/tree/post-05))
- [Virtual Machines](https://awesome-repositories.com/f/operating-systems-systems-programming/virtualization-emulation/virtualization-platforms/virtualization-technologies/virtual-machines.md) — Executes generated kernel disk images within virtualized environments to verify system behavior. ([source](https://github.com/phil-opp/blog_os/tree/post-02))

### Development Tools & Productivity

- [OS Binary Compilation](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-automation-systems/build-systems/binary-compilation-toolchains/server-binary-compilers/hardware-specific-binaries/os-binary-compilation.md) — Compiles code without a standard library to create minimal executables for bare metal hardware.

### DevOps & Infrastructure

- [Task Schedulers](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/task-job-management/task-schedulers/os-scheduling-simulations/task-schedulers.md) — Implements task switching and asynchronous execution to run multiple kernel processes concurrently.

### Programming Languages & Runtimes

- [Embedded Rust](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/systems-languages/rust/operating-systems/embedded-rust.md) — Implements core operating system components in Rust without a standard library for bare-metal execution.

### Software Engineering & Architecture

- [Asynchronous Execution Patterns](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-execution-patterns.md) — Implements asynchronous execution patterns to manage concurrent task execution within the kernel. ([source](https://github.com/phil-opp/blog_os/blob/main/README.md))
- [Process Exception Interception](https://awesome-repositories.com/f/software-engineering-architecture/exception-traceback-capture/process-exception-interception.md) — Captures and processes hardware interrupts and processor exceptions to prevent system crashes. ([source](https://github.com/phil-opp/blog_os/blob/main/README.md))
- [Cooperative Schedulers](https://awesome-repositories.com/f/software-engineering-architecture/task-scheduling/asynchronous-schedulers/cooperative-schedulers.md) — Implements a cooperative multitasking scheduler using asynchronous patterns to share CPU resources.

### Data & Databases

- [Disk Image Imports](https://awesome-repositories.com/f/data-databases/virtual-disk-overlays/disk-image-imports.md) — Loads compiled disk images into virtualization environments to verify kernel functionality. ([source](https://github.com/phil-opp/blog_os/tree/post-07))

### Hardware & IoT

- [USB Boot Media Creation](https://awesome-repositories.com/f/hardware-iot/usb-boot-media-creation.md) — Provides the capability to write compiled disk images to USB drives to boot on real machines. ([source](https://github.com/phil-opp/blog_os/tree/post-03))

### Testing & Quality Assurance

- [Component Testing](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/component-testing.md) — Includes component testing to verify the logic and interoperability of system modules. ([source](https://github.com/phil-opp/blog_os/tree/post-10))
- [System Integration Test Runners](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/e2e-integration-testing/integration-testing-frameworks/system-integration-test-runners.md) — Executes system-level integration tests within the kernel environment to validate hardware interactions. ([source](https://github.com/phil-opp/blog_os/tree/post-04))
- [Integration Testing Suites](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/test-frameworks/test-levels-and-types/integration-testing-suites.md) — Provides integration testing suites to verify the interoperability of kernel-level software units. ([source](https://github.com/phil-opp/blog_os/tree/post-11))
- [Unit Testing](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/testing-frameworks/unit/unit-testing.md) — Provides unit testing to verify the correctness and stability of individual kernel components. ([source](https://github.com/phil-opp/blog_os/tree/post-05))
- [Unit Testing Frameworks](https://awesome-repositories.com/f/testing-quality-assurance/unit-testing-frameworks.md) — Uses automated unit testing frameworks to validate kernel source code functionality before deployment. ([source](https://github.com/phil-opp/blog_os/tree/post-06))
