Architecture - MirSiv/exyde GitHub Wiki

Architecture

Exyde is a microkernel. The kernel handles only what genuinely requires privilege; everything else runs in userspace and talks to the kernel over IPC.

Layers

Applications
    ↓
Unix / POSIX API       (userspace, not built yet)
    ↓
libc + service clients (open/read/write, IPC wrappers)
    ↓
Userspace services     (VFS, console, future drivers)
    ↓
Exyde ABI              (syscalls: handles, IPC, memory)
    ↓
Microkernel
    ↓
Hardware

What is in the kernel

  • Threads and scheduling
  • Address spaces and virtual memory primitives
  • Physical memory management
  • IPC (channels with capability transfer)
  • Synchronization primitives (mutex, semaphore, condvar)
  • Interrupt handling and dispatch
  • Capability / handle tables
  • Process and thread primitives
  • Minimal hardware access

That is the full list. The kernel does not know about files, file descriptors, paths, directories, or devices. Those are userspace concepts built on top of IPC and handles.

What is in userspace

  • init — service manager, spawns everything else
  • console — console output service, wraps the kernel's low-level console-write primitive
  • exy-vfs — VFS core plus RAMFS, serving file operations over IPC
  • test — regression suite
  • echo — minimal IPC echo service
  • libc — string, stdio, malloc, environment, POSIX wrappers
  • libvfs, libconsole — client libraries for the services
  • initrd parser — reads the cpio newc archive

Boot flow

  1. GRUB loads the kernel via Multiboot2.
  2. kmain runs a fixed sequence of kernel self-tests (pmm, vmm, heap, handles, scheduler, sync, channel, ring-3 syscall).
  3. The kernel spawns init, maps the initrd read-only into its address space, and passes its base/size through environment variables.
  4. init parses the initrd, spawns the services with SPAWN_ELF, exercises them, shuts the console down, exits.
  5. The kernel reaps init, checks that no physical pages leaked, and enters the idle loop.

Design rules

  • Unix/POSIX compatibility describes the externally visible behaviour. The internal architecture does not copy Linux.
  • No fake implementations just to make something compile.
  • Every subsystem has a clear interface and lives on the correct side of the kernel boundary.
  • src/kernel/core/** and src/kernel/include/exyde/** never include arch/ headers. Architecture-specific code is under src/kernel/arch/<arch>/.
⚠️ **GitHub.com Fallback** ⚠️