How hermit-os/kernel works
Main Components Organization
a) Architecture Layer (Top Level)
• Kernel (interrupts, scheduler, processor management)
• Memory Management (paging, physical/virtual memory)
• Architecture-specific features (like ACPI for x86_64)
b) Core Kernel Services (Middle Layer)
• Drivers subsystem
• Network drivers (virtio, rtl8139, gem)
• File system drivers
• PCI and MMIO interfaces
• Memory Management
• Task Execution
• System Calls Interface
• Synchronization Primitives
c) Interface Layer (Bottom Layer)
• External Interface components
• Application Integration points
• Runtime support
Detailed Elements
For each major component, show:
• Key files/modules
• External dependencies
• Interface points
• Cross-cutting concerns (logging, error handling)
Implementation Details
• Memory management system
• Task scheduling
• Device driver architecture
• System call interface
Notes Section
Annotations for:
• Build configuration options
• Architecture-specific features
• Logging levels (HERMIT_LOG_LEVEL_FILTER)
• Integration points with Rust/C++ applications
• The modular architecture supporting multiple CPU architectures
• The clean separation between architecture-specific and common code
• The driver subsystem's extensibility
• The system call interface design
• Memory management and task execution models
Keep the abstraction level high enough to show the overall architecture while including enough detail to understand the key components and their interactions. Focus on showing how the unikernel nature of the project influences its architecture and how it differs from traditional kernels.
Remember to highlight the integration points with applications, as this is primarily used as a library kernel linked to applications rather than a standalone operating system.