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
relibc - C Standard Library
relibc - C Standard Library
Redox’s C standard library, written in Rust, providing POSIX compatibility for porting applications from Linux and BSD.
libredox - Redox System Library
libredox - Redox System Library
Rust library for accessing Redox-specific functionality and schemes.
redox-scheme - Scheme Protocol
redox-scheme - Scheme Protocol
Library for implementing scheme providers (resource handlers).
Comparison: Microkernel vs Monolithic
| Aspect | Microkernel (Redox) | Monolithic (Linux) |
|---|---|---|
| Kernel Size | Small (~20K LOC) | Large (>20M LOC) |
| Services Location | Userspace | Kernel space |
| Driver Crashes | Isolated, recoverable | Can crash entire system |
| Security | Strong isolation | Shared kernel space |
| Performance | Context switches overhead | Direct kernel calls |
| Development | Safer, modular | Complex, interdependent |
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.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:4. Security Through Isolation
Each service runs with minimal privileges:System Initialization
Redox boots through a well-defined initialization sequence: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