Skip to main content

What is Redox OS?

Redox is an open-source operating system written in Rust, a language with focus on safety, efficiency and high performance. Redox uses a microkernel architecture, and aims to be reliable, secure, usable, correct, and free.
Redox is inspired by previous operating systems, such as seL4, MINIX, Plan 9, Linux and BSD.

Design Philosophy

Redox is not just a kernel—it’s a full-featured operating system that provides:
  • File system (RedoxFS)
  • Display server (Orbital)
  • Core utilities
  • C POSIX library (relibc)
  • Shell (Ion)
  • Package manager (pkgutils)

Core Principles

Safety

Written entirely in Rust to prevent common security vulnerabilities like buffer overflows and memory corruption

Microkernel

Minimal kernel with most services running in userspace for better isolation and reliability

Unix-like

Provides source code compatibility with many Rust, Linux and BSD programs through relibc

Everything is a URL

Unique scheme system where all resources are accessed through URL-like paths

Architecture Diagram

Key Components

Kernel

The Redox kernel is a microkernel that provides:
  • Process and thread management
  • Memory management
  • Inter-process communication (IPC)
  • Basic schemes (debug, event, memory, pipe, irq, time, sys)
  • Context switching and scheduling
Unlike monolithic kernels, the Redox microkernel runs with minimal privileges and delegates most functionality to userspace services.

System Services

Most operating system functionality runs in userspace:
  • File systems: RedoxFS and other file system drivers
  • Network stack: smolnetd (TCP/IP, UDP, ICMP)
  • Device drivers: Graphics, USB, disk controllers
  • Display server: Orbital (window management)
  • IPC services: Shared memory, channels, Unix domain sockets

Libraries

Redox’s C standard library, written in Rust, providing POSIX compatibility for porting applications from Linux and BSD.
Rust library for accessing Redox-specific functionality and schemes.
Library for implementing scheme providers (resource handlers).

Comparison: Microkernel vs Monolithic

AspectMicrokernel (Redox)Monolithic (Linux)
Kernel SizeSmall (~20K LOC)Large (>20M LOC)
Services LocationUserspaceKernel space
Driver CrashesIsolated, recoverableCan crash entire system
SecurityStrong isolationShared kernel space
PerformanceContext switches overheadDirect kernel calls
DevelopmentSafer, modularComplex, interdependent
Microkernel architectures trade some performance for improved reliability and security. Context switches between userspace and kernel space have overhead, but modern optimizations minimize this impact.

Benefits of Redox’s Architecture

1. Fault Isolation

If a driver or service crashes, it doesn’t bring down the entire system. The microkernel can detect the failure and potentially restart the service.
// Example: A crashed driver doesn't affect other components
if driver_process.crashed() {
    log::error!("Driver {} crashed, restarting...", driver_name);
    restart_service(driver_name);
}

2. Memory Safety

Written in Rust, Redox prevents entire classes of vulnerabilities:
  • Buffer overflows
  • Use-after-free
  • Null pointer dereferences
  • Data races

3. Modularity

Components can be developed, tested, and updated independently:
# Update just the network stack
pkg update smolnetd

# Replace the file system driver
pkg install ramfs

4. Security Through Isolation

Each service runs with minimal privileges:
# From base.toml - User scheme permissions
[user_schemes.user]
schemes = [
  "debug", "event", "memory", "pipe",
  "rand", "null", "zero", "log",
  "ip", "tcp", "udp", "file",
  "pty", "audio", "orbital"
]

System Initialization

Redox boots through a well-defined initialization sequence:
1

Bootloader

Loads the kernel into memory and transfers control
2

Kernel Initialization

Sets up memory management, scheduler, and core schemes
3

Init Scripts

Runs initialization scripts from /usr/lib/init.d/
4

Service Startup

Starts essential services (ipcd, ptyd, drivers)
5

User Session

Launches display server and user applications

Next Steps

Microkernel Design

Deep dive into the microkernel architecture

System Components

Explore major system components

Scheme System

Learn about Redox’s everything-is-a-URL design

Contributing

Start contributing to Redox OS

Build docs developers (and LLMs) love