Introduction to Anos: A Hobbyist Operating System
Anos represents an experimental, nonPOSIX operating system tailored for x86_64 PCs and RISC-V machines. Despite its early toy kernel status, it showcases user-mode preemptive multitasking across up to 16 CPUs. This capability is complemented by sufficient kernel support to enable functional device drivers in user space while operating on real hardware. Unlike other professional platforms such as GNU/Linux, Anos is designed to remain a hobbyist project, intentionally smaller in scope and opinionated in its architecture.
Microkernel Design and Core Kernel Features
At the heart of Anos lies the STAGE3 microkernel, which is nonzealous in its design philosophy. Its primary goal is to provide only the bare minimum hardware drivers required for kernel operations. This includes functionality for CPU architectures like x86_64 and RISC-V. The kernel supports inter-process communication (IPC) through synchronous, zero-copy message-passing mechanisms, enhancing efficiency in data exchange between processes.
As a 64-bit system from inception, Anos leverages architectural opportunities that would otherwise be unavailable. Current implementations include a small, targeted syscall interface and a fast communication channel using SYSCALL and SYSRET on x86_64 or ecall on RISC-V. While many design decisions remain fluid, these foundational elements illustrate the modular and experimental nature of the kernel.
User Mode System Supervisor
The SYSTEM component of Anos functions as a user-mode supervisor, coordinating the activities of other services to deliver core operating system capabilities. This includes managing hardware drivers such as PCI and AHCI through capability-based MMIO. SYSTEM acts as a userspace bootstrap, managing processes and delegating specific tasks to other components. By centralizing these operations, it allows the kernel to remain lightweight and focused on critical system-level tasks.
Development Tools and Licensing
Anos development leverages a custom toolchain based on Binutils, GCC 16 (experimental), and Newlib. The inclusion of a custom libgloss further tailors the toolchain to Anos' unique requirements. As an open-source project, Anos is distributed under the GPLv2 license with linkage exceptions, mirroring the licensing approaches of other major free operating systems. This ensures that contributors and developers can freely extend its capabilities while adhering to well-established open-source principles.
Experimental Features and Future Directions
One of the distinguishing aspects of Anos is its experimental nature. By designing the system as 64-bit from the outset, the project has the freedom to test novel architectural concepts. Current experiments include refining IPC mechanisms and optimizing kernel scheduling. However, the developers emphasize that many decisions are subject to change, reflecting the iterative and exploratory nature of the project. This flexibility allows Anos to adapt and evolve without the constraints typically faced by more established operating systems.
Conclusion
Anos provides a unique platform for exploring nonPOSIX principles in operating system design. By combining a nonzealous microkernel, user-mode system services, and experimental tools, it offers a compelling foundation for both hobbyists and researchers. Although still in its infancy, Anos demonstrates the potential of lightweight, modular design in modern operating systems.