# implusos/kernel architecture

> Architecture diagram of the GitHub repository implusos/kernel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/implusos/kernel
- Repository: https://github.com/implusos/kernel

## Overview

ImplusOS Kernel is a monolithic operating-system kernel. Its user-facing path is system calls into process, file, and socket services, backed by VFS, memory management, IPC, and networking. Boot and hardware support are provided by architecture-specific code and a loadable-driver manager. The README documents filesystem drivers, Linux ABI compatibility, and the Ethernet-to-transport network stack; some subsystem internals were not sampled, so links among those components are shown only where the README or indexed source references support them.

Main entry points: [`Source/Core/kernel_main.c`](https://github.com/implusos/kernel/blob/main/Source/Core/kernel_main.c) (Kernel Boot), [`Source/Core/syscall`](https://github.com/implusos/kernel/tree/main/Source/Core/syscall) (Syscall Services), [`Source/Core/process/ProcessManager_Create.c`](https://github.com/implusos/kernel/blob/main/Source/Core/process/ProcessManager_Create.c) (Process Management), [`Source/Arch`](https://github.com/implusos/kernel/tree/main/Source/Arch) (Architecture Support)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Kernel Core"]
  node_boot["Kernel Boot<br/>[kernel_main.c]"]
  node_process["Process Management"]
  node_memory["Memory Management<br/>[Memory_Main.c]"]
  node_ipc["IPC and Unix Sockets<br/>[UnixSocket.c]"]
  node_sharedmem["Shared Memory<br/>[SharedMemory.c]"]
end

subgraph group_syscalls["User Interfaces"]
  node_syscall["Syscall Services"]
  node_linuxabi["Linux Compatibility"]
end

subgraph group_storage["Filesystems"]
  node_vfs["Virtual Filesystem<br/>[VFS.c]"]
  node_fsdrivers["Filesystem Drivers"]
end

subgraph group_hardware["Hardware Drivers"]
  node_driver_mgr["Driver Manager<br/>[DriverManager.c]"]
  node_device_registry["Device Registry<br/>[DeviceRegistry.h]"]
  node_usb_storage["USB Mass Storage"]
  node_usb_module["USB Storage Module<br/>[MassStorage.c]"]
end

subgraph group_platform["Platform Services"]
  node_network["Network Stack<br/>[network_main.c]"]
  node_ethernet["Ethernet and IPv4<br/>[ipv4.c]"]
  node_tcp["TCP Transport<br/>[TCP.c]"]
  node_arch["Architecture Support"]
  node_timer["Kernel Timer<br/>[Timer.c]"]
  node_serial["Serial Logging<br/>[Serial.c]"]
end

node_user(("User Process"))

node_user -.->|"invokes"| node_syscall
node_syscall -->|"manages"| node_process
node_syscall -->|"uses"| node_vfs
node_linuxabi -->|"dispatches to"| node_syscall
node_process -->|"uses"| node_ipc
node_process -->|"uses"| node_sharedmem
node_vfs -.->|"mounts"| node_fsdrivers
node_network -.->|"implements"| node_ethernet
node_ethernet -.->|"supports"| node_tcp
node_driver_mgr -->|"registers devices"| node_device_registry
node_usb_storage -->|"requests USB driver"| node_driver_mgr
node_usb_module -.->|"serves block requests"| node_usb_storage
node_boot -.->|"initializes platform"| node_arch
node_boot -.->|"initializes drivers"| node_driver_mgr
node_boot -.->|"initializes VFS"| node_vfs
node_boot -.->|"initializes memory"| node_memory
node_arch -->|"provides timer HAL"| node_timer
node_arch -->|"provides UART HAL"| node_serial

click node_boot "https://github.com/implusos/kernel/blob/main/Source/Core/kernel_main.c"
click node_process "https://github.com/implusos/kernel/blob/main/Source/Core/process/ProcessManager_Create.c"
click node_memory "https://github.com/implusos/kernel/blob/main/Source/MemoryManagement/Memory_Main.c"
click node_syscall "https://github.com/implusos/kernel/tree/main/Source/Core/syscall"
click node_linuxabi "https://github.com/implusos/kernel/blob/main/Source/Compat/Linux/Syscall_LinuxCompat.c"
click node_vfs "https://github.com/implusos/kernel/blob/main/Source/Core/vfs/VFS.c"
click node_fsdrivers "https://github.com/implusos/kernel/tree/main/Source/Drivers/FileSystem"
click node_ipc "https://github.com/implusos/kernel/blob/main/Source/IPC/UnixSocket.c"
click node_sharedmem "https://github.com/implusos/kernel/blob/main/Source/Core/memory/SharedMemory.c"
click node_network "https://github.com/implusos/kernel/blob/main/Source/Network/network_main.c"
click node_ethernet "https://github.com/implusos/kernel/blob/main/Source/Network/ipv4.c"
click node_tcp "https://github.com/implusos/kernel/blob/main/Source/Network/tcp/TCP.c"
click node_driver_mgr "https://github.com/implusos/kernel/blob/main/Source/Drivers/Module/DriverManager.c"
click node_device_registry "https://github.com/implusos/kernel/blob/main/Source/Drivers/Module/DeviceRegistry.h"
click node_usb_storage "https://github.com/implusos/kernel/blob/main/Source/Platform/io/Protocol/USB_MassStorage/Protocol_USB_MassStorage.c"
click node_usb_module "https://github.com/implusos/kernel/blob/main/Source/Drivers/Bus/USB/MassStorage/MassStorage.c"
click node_arch "https://github.com/implusos/kernel/tree/main/Source/Arch"
click node_timer "https://github.com/implusos/kernel/blob/main/Source/Core/timer/Timer.c"
click node_serial "https://github.com/implusos/kernel/blob/main/Source/Debug/serial/Serial.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_boot,node_process,node_memory,node_ipc,node_sharedmem,node_user toneBlue
class node_syscall,node_linuxabi toneAmber
class node_vfs,node_fsdrivers toneMint
class node_driver_mgr,node_device_registry,node_usb_storage,node_usb_module toneRose
class node_network,node_ethernet,node_tcp,node_arch,node_timer,node_serial toneIndigo
```

## Components

### Kernel Core

- [Kernel Boot](https://github.com/implusos/kernel/blob/main/Source/Core/kernel_main.c): `Source/Core/kernel_main.c`
- [Process Management](https://github.com/implusos/kernel/blob/main/Source/Core/process/ProcessManager_Create.c): `Source/Core/process/ProcessManager_Create.c`
- [Memory Management](https://github.com/implusos/kernel/blob/main/Source/MemoryManagement/Memory_Main.c): `Source/MemoryManagement/Memory_Main.c`
- [IPC and Unix Sockets](https://github.com/implusos/kernel/blob/main/Source/IPC/UnixSocket.c): `Source/IPC/UnixSocket.c`
- [Shared Memory](https://github.com/implusos/kernel/blob/main/Source/Core/memory/SharedMemory.c): `Source/Core/memory/SharedMemory.c`

### User Interfaces

- [Syscall Services](https://github.com/implusos/kernel/tree/main/Source/Core/syscall): `Source/Core/syscall`
- [Linux Compatibility](https://github.com/implusos/kernel/blob/main/Source/Compat/Linux/Syscall_LinuxCompat.c): `Source/Compat/Linux/Syscall_LinuxCompat.c`

### Filesystems

- [Virtual Filesystem](https://github.com/implusos/kernel/blob/main/Source/Core/vfs/VFS.c): `Source/Core/vfs/VFS.c`
- [Filesystem Drivers](https://github.com/implusos/kernel/tree/main/Source/Drivers/FileSystem): `Source/Drivers/FileSystem`

### Hardware Drivers

- [Driver Manager](https://github.com/implusos/kernel/blob/main/Source/Drivers/Module/DriverManager.c): `Source/Drivers/Module/DriverManager.c`
- [Device Registry](https://github.com/implusos/kernel/blob/main/Source/Drivers/Module/DeviceRegistry.h): `Source/Drivers/Module/DeviceRegistry.h`
- [USB Mass Storage](https://github.com/implusos/kernel/blob/main/Source/Platform/io/Protocol/USB_MassStorage/Protocol_USB_MassStorage.c): `Source/Platform/io/Protocol/USB_MassStorage/Protocol_USB_MassStorage.c`
- [USB Storage Module](https://github.com/implusos/kernel/blob/main/Source/Drivers/Bus/USB/MassStorage/MassStorage.c): `Source/Drivers/Bus/USB/MassStorage/MassStorage.c`

### Platform Services

- [Network Stack](https://github.com/implusos/kernel/blob/main/Source/Network/network_main.c): `Source/Network/network_main.c`
- [Ethernet and IPv4](https://github.com/implusos/kernel/blob/main/Source/Network/ipv4.c): `Source/Network/ipv4.c`
- [TCP Transport](https://github.com/implusos/kernel/blob/main/Source/Network/tcp/TCP.c): `Source/Network/tcp/TCP.c`
- [Architecture Support](https://github.com/implusos/kernel/tree/main/Source/Arch): `Source/Arch`
- [Kernel Timer](https://github.com/implusos/kernel/blob/main/Source/Core/timer/Timer.c): `Source/Core/timer/Timer.c`
- [Serial Logging](https://github.com/implusos/kernel/blob/main/Source/Debug/serial/Serial.c): `Source/Debug/serial/Serial.c`

### Other components

- **User Process**

## Connections

- User Process → Syscall Services: invokes
- Syscall Services → Process Management: manages (evidence: `Source/Core/process/ProcessManager_Create.c`)
- Syscall Services → Virtual Filesystem: uses (evidence: `Source/Core/syscall/Syscall_File.h`)
- Linux Compatibility → Syscall Services: dispatches to (evidence: `Source/Compat/Linux/Syscall_LinuxCompat.c`)
- Process Management → IPC and Unix Sockets: uses (evidence: `Source/Core/process/ProcessManager_Create.c`)
- Process Management → Shared Memory: uses (evidence: `Source/Core/process/ProcessManager_Create.c`)
- Virtual Filesystem → Filesystem Drivers: mounts (evidence: `README.md`)
- Network Stack → Ethernet and IPv4: implements (evidence: `README.md`)
- Ethernet and IPv4 → TCP Transport: supports (evidence: `README.md`)
- Driver Manager → Device Registry: registers devices (evidence: `Source/Drivers/Module/DriverManager.c`)
- USB Mass Storage → Driver Manager: requests USB driver (evidence: `Source/Platform/io/Protocol/USB_MassStorage/Protocol_USB_MassStorage.c`)
- USB Storage Module → USB Mass Storage: serves block requests
- Kernel Boot → Architecture Support: initializes platform (evidence: `README.md`)
- Kernel Boot → Driver Manager: initializes drivers
- Kernel Boot → Virtual Filesystem: initializes VFS
- Kernel Boot → Memory Management: initializes memory
- Architecture Support → Kernel Timer: provides timer HAL
- Architecture Support → Serial Logging: provides UART HAL (evidence: `Source/Debug/serial/Serial.c`)
