How khaledh/fusion works
Main System Components
a. Boot Layer
• UEFI Bootloader (src/boot/)
• Interaction with OVMF firmware
• Bootinfo passing mechanism to kernel
b. Kernel Layer (src/kernel/)
• Memory Management Components
• Physical Memory Manager (pmm.nim)
• Virtual Memory Manager (vmm.nim)
• Page Tables (pagetables.nim)
• Task Management
• Scheduler (sched.nim)
• Task Manager (taskmgr.nim)
• Context Switching (ctxswitch.nim)
• Hardware Abstraction
• CPU Management (cpu.nim)
• Interrupt Handling (idt.nim)
• Device Management (devmgr.nim)
• IPC Mechanisms
• Channels (channels.nim)
• Condition Variables (condvars.nim)
• Locks (locks.nim)
c. Driver Layer (src/kernel/drivers/)
• PCI Driver (pci.nim)
• Graphics Driver (bga.nim)
• Timer Driver (pit.nim)
d. User Space (src/user/)
• User Tasks (utask.nim)
• System Library Interface (src/syslib/)
Component Relationships
Key interactions:
a. Boot Flow:
• UEFI → Bootloader → Kernel initialization
b. Memory Management:
• VMM ↔ PMM
• Page Tables interaction with both
c. Task Management:
• Scheduler → Task Manager
• System Calls path from User Space
d. IPC Flow:
• Channels between tasks
• Synchronization primitives
Technical Details
• Memory layout sections
• Interrupt handling flow
• Task state transitions
• IPC message passing paths
• Hardware interaction paths
Notes for Implementation
• Adding a separate detailed view for the memory management subsystem