# verryhdyt/vos architecture

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

- Interactive diagram: https://gitdiagram.com/verryhdyt/vos
- Repository: https://github.com/verryhdyt/vos

## Overview

VOS is a small experimental x86-64 kernel booted through Limine. Its main user-facing workflow is boot into a serial-console command shell, enter a command, and receive system information or an action. The sampled code shows boot initialization, serial I/O, command handling, memory and CPU reporting, and IDT setup and inspection. The README describes bootable ISO and disk-image use, but those are build outputs rather than runtime subsystems. The source excerpts are partial, so unsampled interrupt-stub behavior and other implementation details are not expanded.

Main entry points: [`kernel/src/main.c`](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c) (Kernel entry), [`kernel/src/idt.c`](https://github.com/verryhdyt/vos/blob/main/kernel/src/idt.c) (IDT setup), [`kernel/src/interrupts.asm`](https://github.com/verryhdyt/vos/blob/main/kernel/src/interrupts.asm) (Interrupt stubs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and interrupts"]
  node_kmain["Kernel entry<br/>[main.c]"]
  node_idt_setup["IDT setup<br/>[idt.c]"]
  node_interrupt_stubs["Interrupt stubs<br/>[interrupts.asm]"]
end

subgraph group_console["Serial command shell"]
  node_serial_io["Serial I/O<br/>[main.c]"]
  node_shell["Interactive shell<br/>[main.c]"]
  node_command_dispatch["Command dispatch<br/>[main.c]"]
end

subgraph group_kernel["Kernel services"]
  node_memory_report["Memory report<br/>[main.c]"]
  node_cpu_report["CPU report<br/>[main.c]"]
  node_idt_report["IDT report<br/>[main.c]"]
  node_memory_primitives["Memory primitives<br/>[memory.c]"]
end

node_limine(("Limine bootloader"))

node_limine -->|"boots kernel"| node_kmain
node_kmain -->|"initializes"| node_serial_io
node_kmain -->|"initializes"| node_idt_setup
node_kmain -->|"enters"| node_shell
node_shell -->|"reads and writes"| node_serial_io
node_shell -->|"dispatches commands"| node_command_dispatch
node_command_dispatch -->|"runs"| node_memory_report
node_command_dispatch -->|"runs"| node_cpu_report
node_command_dispatch -->|"runs"| node_idt_report
node_idt_report -->|"reads IDT state"| node_idt_setup
node_idt_setup -->|"installs handlers"| node_interrupt_stubs

click node_kmain "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_idt_setup "https://github.com/verryhdyt/vos/blob/main/kernel/src/idt.c"
click node_interrupt_stubs "https://github.com/verryhdyt/vos/blob/main/kernel/src/interrupts.asm"
click node_serial_io "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_shell "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_command_dispatch "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_memory_report "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_cpu_report "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_idt_report "https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c"
click node_memory_primitives "https://github.com/verryhdyt/vos/blob/main/kernel/src/memory.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_kmain,node_idt_setup,node_interrupt_stubs toneBlue
class node_serial_io,node_shell,node_command_dispatch toneAmber
class node_memory_report,node_cpu_report,node_idt_report,node_memory_primitives toneMint
class node_limine toneIndigo
```

## Components

### Boot and interrupts

- [Kernel entry](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [IDT setup](https://github.com/verryhdyt/vos/blob/main/kernel/src/idt.c): `kernel/src/idt.c`
- [Interrupt stubs](https://github.com/verryhdyt/vos/blob/main/kernel/src/interrupts.asm): `kernel/src/interrupts.asm`

### Serial command shell

- [Serial I/O](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [Interactive shell](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [Command dispatch](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`

### Kernel services

- [Memory report](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [CPU report](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [IDT report](https://github.com/verryhdyt/vos/blob/main/kernel/src/main.c): `kernel/src/main.c`
- [Memory primitives](https://github.com/verryhdyt/vos/blob/main/kernel/src/memory.c): `kernel/src/memory.c`

### Other components

- **Limine bootloader**

## Connections

- Limine bootloader → Kernel entry: boots kernel (evidence: `README.md`)
- Kernel entry → Serial I/O: initializes (evidence: `kernel/src/main.c`)
- Kernel entry → IDT setup: initializes (evidence: `kernel/src/main.c`)
- Kernel entry → Interactive shell: enters (evidence: `kernel/src/main.c`)
- Interactive shell → Serial I/O: reads and writes (evidence: `kernel/src/main.c`)
- Interactive shell → Command dispatch: dispatches commands (evidence: `kernel/src/main.c`)
- Command dispatch → Memory report: runs (evidence: `kernel/src/main.c`)
- Command dispatch → CPU report: runs (evidence: `kernel/src/main.c`)
- Command dispatch → IDT report: runs (evidence: `kernel/src/main.c`)
- IDT report → IDT setup: reads IDT state (evidence: `kernel/src/main.c`)
- IDT setup → Interrupt stubs: installs handlers (evidence: `kernel/src/idt.c`)
