Anos: A Modern, Non-POSIX Hobby Operating System
AI Summary
Anos is a burgeoning operating system project that has reached the 'toy kernel' stage, supporting user mode preemptive multitasking on up to 16 CPUs and running on real hardware. Designed for x86_64 PCs and RISC-V machines, Anos is a modern, opinionated, non-POSIX OS that includes a microkernel, a user-mode supervisor, and a set of servers forming the OS base. The microkernel, known as STAGE3, handles scheduling, memory management, and inter-process communication (IPC), while the SYSTEM supervisor manages user-space processes and hardware drivers. Anos employs a strict capability-based security model, ensuring that processes have limited syscall capabilities, relying on fast IPC for service requests.
The kernel is designed with a non-zealous approach, providing only essential drivers and supporting both x86_64 and RISC-V architectures. It features a simple syscall interface and a prioritised round-robin scheduler, although improvements are planned. Anos supports symmetric multiprocessing (SMP) on x86_64, with plans to extend this to RISC-V. The custom toolchain, based on binutils, GCC, and Newlib, is crucial for building Anos, ensuring feature parity across architectures.
Building Anos requires a UNIX environment with make, and the process involves compiling the kernel, user-mode supervisor, and test servers, creating a UEFI-bootable image. Debugging is supported via qemu's GDB remote debug stub, with configurations available for IDEs like CLion and VSCode. Anos runs on emulators like Qemu and has been tested on real hardware, specifically an old Haswell i5 machine.
The project is still evolving, with ongoing work to improve SMP support, enhance the scheduler, and expand RISC-V capabilities. While the RISC-V version is untested on real hardware, it functions well in emulators, albeit without full device tree or PCI support. Anos is a free software project under the GPLv2 license, inviting contributions and collaboration from the open-source community.
Key Concepts
A microkernel is a minimalistic kernel design that provides only the essential mechanisms needed for an operating system, such as low-level address space management, thread management, and inter-process communication (IPC). It delegates most services, like device drivers and file systems, to user space.
Capability-based security is a model that controls access to resources through tokens or 'capabilities' that specify the operations a process can perform. This approach limits the potential damage from security breaches by restricting processes to only the capabilities they need.
Category
TechnologyOriginal source
https://github.com/roscopeco/anosMore on Discover
Summarized by Mente
Save any article, video, or tweet. AI summarizes it, finds connections, and creates your to-do list.
Start free, no credit card