# alexdev8930/noviumos architecture

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

- Interactive diagram: https://gitdiagram.com/alexdev8930/noviumos
- Repository: https://github.com/alexdev8930/noviumos

## Overview

Novium is a small, hobby x86 operating system. Its principal runtime path is boot handoff into kernel initialization, followed by memory setup and task startup; kernel tasks then interact through IPC, while console and keyboard drivers provide basic input/output. The README also documents interrupt handling, timer, scheduler, and memory-management capabilities. The filesystem is explicitly described as early stubs. Several implementation relationships are omitted where the supplied excerpts do not show the calls.

Main entry points: [`init/main.c`](https://github.com/alexdev8930/noviumos/blob/main/init/main.c) (Kernel startup), [`drivers/input/keyboard.c`](https://github.com/alexdev8930/noviumos/blob/main/drivers/input/keyboard.c) (Keyboard driver), [`arch/x86_32/boot/hw_init.c`](https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/boot/hw_init.c) (Hardware init), [`drivers/input/ps2.c`](https://github.com/alexdev8930/noviumos/blob/main/drivers/input/ps2.c) (PS/2 input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and kernel"]
  node_hwinit["Hardware init<br/>[hw_init.c]"]
  node_kernel_entry["Kernel startup<br/>[main.c]"]
end

subgraph group_hardware["Hardware drivers"]
  node_irq["IRQ handling<br/>[irq.c]"]
  node_pit["PIT timer<br/>[pit.c]"]
  node_keyboard["Keyboard driver<br/>[keyboard.c]"]
  node_ps2["PS/2 input<br/>[ps2.c]"]
  node_vga["VGA console<br/>[vga_console.c]"]
  node_framebuffer["Framebuffer<br/>[framebuffer.c]"]
end

subgraph group_memory["Memory management"]
  node_paging["Virtual memory<br/>[paging.c]"]
  node_page_alloc["Page allocator<br/>[page_alloc.c]"]
  node_heap["Kernel heap<br/>[heap.c]"]
end

subgraph group_tasks["Tasks and IPC"]
  node_scheduler["Task scheduler<br/>[sched.c]"]
  node_message_ports["Message ports<br/>[message.c]"]
  node_ipc_wait["IPC wait queues<br/>[ipc.c]"]
  node_sync["Semaphores and mutexes<br/>[sync.c]"]
end

subgraph group_fs["Filesystem stubs"]
  node_initrd["Initrd<br/>[initrd.c]"]
  node_vfs["Virtual filesystem<br/>[vfs.c]"]
end

node_grub(("GRUB"))
node_bootstrap(("Bootstrap setup"))

node_grub -->|"loads kernel"| node_bootstrap
node_bootstrap -->|"calls"| node_hwinit
node_kernel_entry -->|"prints console output"| node_vga
node_kernel_entry -->|"initializes"| node_paging
node_kernel_entry -->|"checks free pages"| node_page_alloc
node_kernel_entry -->|"allocates and frees"| node_heap
node_kernel_entry -->|"creates and yields tasks"| node_scheduler
node_kernel_entry -->|"tests message passing"| node_message_ports
node_kernel_entry -->|"tests synchronization"| node_sync
node_keyboard -->|"reads scancodes"| node_ps2

click node_hwinit "https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/boot/hw_init.c"
click node_kernel_entry "https://github.com/alexdev8930/noviumos/blob/main/init/main.c"
click node_irq "https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/kernel/irq.c"
click node_pit "https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/kernel/pit.c"
click node_keyboard "https://github.com/alexdev8930/noviumos/blob/main/drivers/input/keyboard.c"
click node_ps2 "https://github.com/alexdev8930/noviumos/blob/main/drivers/input/ps2.c"
click node_vga "https://github.com/alexdev8930/noviumos/blob/main/drivers/video/vga_console.c"
click node_framebuffer "https://github.com/alexdev8930/noviumos/blob/main/drivers/video/framebuffer.c"
click node_paging "https://github.com/alexdev8930/noviumos/blob/main/mm/paging.c"
click node_page_alloc "https://github.com/alexdev8930/noviumos/blob/main/mm/page_alloc.c"
click node_heap "https://github.com/alexdev8930/noviumos/blob/main/mm/heap.c"
click node_scheduler "https://github.com/alexdev8930/noviumos/blob/main/kernel/sched.c"
click node_message_ports "https://github.com/alexdev8930/noviumos/blob/main/ipc/message.c"
click node_ipc_wait "https://github.com/alexdev8930/noviumos/blob/main/ipc/ipc.c"
click node_sync "https://github.com/alexdev8930/noviumos/blob/main/ipc/sync.c"
click node_initrd "https://github.com/alexdev8930/noviumos/blob/main/fs/initrd.c"
click node_vfs "https://github.com/alexdev8930/noviumos/blob/main/fs/vfs.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_hwinit,node_kernel_entry toneBlue
class node_irq,node_pit,node_keyboard,node_ps2,node_vga,node_framebuffer toneAmber
class node_paging,node_page_alloc,node_heap toneMint
class node_scheduler,node_message_ports,node_ipc_wait,node_sync toneRose
class node_initrd,node_vfs,node_grub,node_bootstrap toneIndigo
```

## Components

### Boot and kernel

- [Hardware init](https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/boot/hw_init.c): `arch/x86_32/boot/hw_init.c`
- [Kernel startup](https://github.com/alexdev8930/noviumos/blob/main/init/main.c): `init/main.c`

### Hardware drivers

- [IRQ handling](https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/kernel/irq.c): `arch/x86_32/kernel/irq.c`
- [PIT timer](https://github.com/alexdev8930/noviumos/blob/main/arch/x86_32/kernel/pit.c): `arch/x86_32/kernel/pit.c`
- [Keyboard driver](https://github.com/alexdev8930/noviumos/blob/main/drivers/input/keyboard.c): `drivers/input/keyboard.c`
- [PS/2 input](https://github.com/alexdev8930/noviumos/blob/main/drivers/input/ps2.c): `drivers/input/ps2.c`
- [VGA console](https://github.com/alexdev8930/noviumos/blob/main/drivers/video/vga_console.c): `drivers/video/vga_console.c`
- [Framebuffer](https://github.com/alexdev8930/noviumos/blob/main/drivers/video/framebuffer.c): `drivers/video/framebuffer.c`

### Memory management

- [Virtual memory](https://github.com/alexdev8930/noviumos/blob/main/mm/paging.c): `mm/paging.c`
- [Page allocator](https://github.com/alexdev8930/noviumos/blob/main/mm/page_alloc.c): `mm/page_alloc.c`
- [Kernel heap](https://github.com/alexdev8930/noviumos/blob/main/mm/heap.c): `mm/heap.c`

### Tasks and IPC

- [Task scheduler](https://github.com/alexdev8930/noviumos/blob/main/kernel/sched.c): `kernel/sched.c`
- [Message ports](https://github.com/alexdev8930/noviumos/blob/main/ipc/message.c): `ipc/message.c`
- [IPC wait queues](https://github.com/alexdev8930/noviumos/blob/main/ipc/ipc.c): `ipc/ipc.c`
- [Semaphores and mutexes](https://github.com/alexdev8930/noviumos/blob/main/ipc/sync.c): `ipc/sync.c`

### Filesystem stubs

- [Initrd](https://github.com/alexdev8930/noviumos/blob/main/fs/initrd.c): `fs/initrd.c`
- [Virtual filesystem](https://github.com/alexdev8930/noviumos/blob/main/fs/vfs.c): `fs/vfs.c`

### Other components

- **GRUB**
- **Bootstrap setup**

## Connections

- GRUB → Bootstrap setup: loads kernel
- Bootstrap setup → Hardware init: calls
- Kernel startup → VGA console: prints console output (evidence: `init/main.c`)
- Kernel startup → Virtual memory: initializes (evidence: `init/main.c`)
- Kernel startup → Page allocator: checks free pages (evidence: `init/main.c`)
- Kernel startup → Kernel heap: allocates and frees (evidence: `init/main.c`)
- Kernel startup → Task scheduler: creates and yields tasks (evidence: `init/main.c`)
- Kernel startup → Message ports: tests message passing (evidence: `init/main.c`)
- Kernel startup → Semaphores and mutexes: tests synchronization (evidence: `init/main.c`)
- Keyboard driver → PS/2 input: reads scancodes (evidence: `drivers/input/keyboard.c`)
