How robbedgreef/yanix works
Project Type and Purpose
• yanix is a hobbyist, monolithic, preemptible UNIX-like kernel aiming for high POSIX compliance. It is not only an educational platform to learn OS development but also an evolving OS that supports basic multitasking, virtual filesystems, and a set of drivers.
• The project includes components for bootstrapping (bootloader stages), a robust kernel (complete with device drivers, memory management, and process handling), libraries (graphics and event handling), system tools (command-line utilities and a shell), and even some user applications (found in apps).
Relationships and Interactions
• Within the kernel, show interactions:
– Initialization flows from architecture-specific boot code → CPU setup → memory management.
– Drivers interact with hardware and feed into higher-level kernel services (e.g., interrupts from keyboard or timer feeding into task scheduling).
– Filesystem modules interface with the storage devices (via drivers) and supply file operations to processes.
• How the Libraries integrate: for instance, the igl library providing a windowing system that interacts with both user applications and low-level graphical drivers.
• How user applications (apps, system tools) run on top of the kernel services and utilize the sysroot environment.
Architectural Patterns & Design Principles
• Monolithic Kernel: Emphasize that almost all OS services (driver management, file systems, process scheduling, etc.) are part of one large kernel image.
• Modular Breakdown: Although monolithic, the structure is decomposed into clearly separated modules (drivers, filesystem, memory, scheduling) to help clarity.
• Boot Sequence: Demonstrate the two-stage bootloader process ensuring that the kernel is properly loaded and initialized.
• POSIX Compliance: While not depicted in detail, note that kernel services are designed with the POSIX model in mind (system calls, user processes, etc.).
• Separation of Userland and Kernel: Even though libraries and utilities are bundled, there is a clear conceptual separation of kernel space (bootloader, kernel) and user space (apps, tools, sysroot).