# dizzrt/bigos architecture

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

- Interactive diagram: https://gitdiagram.com/dizzrt/bigos
- Repository: https://github.com/dizzrt/bigos

## Overview

BigOS is a freestanding x86_64 operating system, with UEFI as its default boot path and a Legacy compatibility path. Its principal workflow is boot and handoff into the kernel, then user processes enter through syscalls to access process, filesystem, terminal, and network services; PID 1 starts and restarts the shell. The graph also retains documented memory, scheduling, and hardware layers. The README documents several capabilities whose implementation was not sampled, so those are shown only where the tree supports a subsystem path; uncertain wiring is omitted.

Main entry points: [`kernel/core/syscall/syscall.cc`](https://github.com/dizzrt/bigos/blob/main/kernel/core/syscall/syscall.cc) (Syscall dispatcher), [`kernel/core/kernel.cc`](https://github.com/dizzrt/bigos/blob/main/kernel/core/kernel.cc) (Kernel entry), [`kernel/core/fs/vfs.cc`](https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/vfs.cc) (VFS), [`kernel/core/proc/proc.cc`](https://github.com/dizzrt/bigos/blob/main/kernel/core/proc/proc.cc) (Process lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot"]
  node_uefi["UEFI loader<br/>[loader.cc]"]
  node_legacy["Legacy boot<br/>[boot.cc]"]
  node_handoff["Boot handoff<br/>[boot_handoff.cc]"]
end

subgraph group_kernel["Kernel runtime"]
  node_kernel_init["Kernel entry<br/>[kernel.cc]"]
  node_interrupts["Interrupt dispatch<br/>[interrupt.cc]"]
  node_scheduler["Scheduler<br/>[sched.cc]"]
  node_memory["Memory manager<br/>[memory.cc]"]
  node_syscalls["Syscall dispatcher<br/>[syscall.cc]"]
  node_processes["Process lifecycle<br/>[proc.cc]"]
  node_pipe["Pipes<br/>[pipe.cc]"]
end

subgraph group_storage["Storage and I/O"]
  node_vfs["VFS<br/>[vfs.cc]"]
  node_bigfs["BigFS<br/>[bigfs.cc]"]
  node_exfat["exFAT<br/>[exfat.cc]"]
  node_block_io["Block I/O<br/>[block_io.cc]"]
end

subgraph group_hardware["Hardware and network"]
  node_block_drivers["Block drivers"]
  node_terminal["TTY and console<br/>[tty.cc]"]
  node_network["Network protocols<br/>[protocol.cc]"]
  node_sockets["Sockets<br/>[socket.cc]"]
  node_net_driver["Virtio network<br/>[virtio_net.cc]"]
end

subgraph group_userland["Userland"]
  node_init["PID 1 init<br/>[init.c]"]
  node_shell["Shell<br/>[sh.c]"]
  node_libc["User libc<br/>[syscall.c]"]
  node_programs["User programs"]
end

node_power(("Platform"))

node_power -->|"starts"| node_uefi
node_power -.->|"starts"| node_legacy
node_uefi -->|"passes boot data"| node_handoff
node_legacy -.->|"passes boot data"| node_handoff
node_handoff -->|"hands off"| node_kernel_init
node_kernel_init -->|"starts"| node_scheduler
node_kernel_init -->|"initializes"| node_interrupts
node_kernel_init -->|"initializes"| node_memory
node_interrupts -->|"dispatches"| node_syscalls
node_syscalls -->|"dispatches"| node_processes
node_syscalls -->|"calls"| node_vfs
node_syscalls -->|"calls"| node_pipe
node_syscalls -->|"calls"| node_sockets
node_processes -->|"maps user space"| node_memory
node_processes -->|"loads executable"| node_vfs
node_vfs -->|"routes filesystem access"| node_bigfs
node_vfs -->|"routes filesystem access"| node_exfat
node_bigfs -->|"reads and writes"| node_block_io
node_exfat -->|"reads"| node_block_io
node_block_io -->|"dispatches requests"| node_block_drivers
node_terminal -->|"receives keyboard IRQ"| node_interrupts
node_sockets -->|"uses protocols"| node_network
node_network -->|"sends and receives"| node_net_driver
node_init -->|"uses"| node_libc
node_libc -->|"issues calls"| node_syscalls
node_init -->|"starts and restarts"| node_shell
node_shell -->|"executes"| node_programs
node_programs -->|"uses"| node_libc

click node_uefi "https://github.com/dizzrt/bigos/blob/main/kernel/arch/x86/uefi/loader.cc"
click node_legacy "https://github.com/dizzrt/bigos/blob/main/kernel/arch/x86/boot/boot.cc"
click node_handoff "https://github.com/dizzrt/bigos/blob/main/kernel/mm/boot_handoff.cc"
click node_kernel_init "https://github.com/dizzrt/bigos/blob/main/kernel/core/kernel.cc"
click node_interrupts "https://github.com/dizzrt/bigos/blob/main/kernel/core/irq/interrupt.cc"
click node_scheduler "https://github.com/dizzrt/bigos/blob/main/kernel/core/sched/sched.cc"
click node_memory "https://github.com/dizzrt/bigos/blob/main/kernel/mm/memory.cc"
click node_syscalls "https://github.com/dizzrt/bigos/blob/main/kernel/core/syscall/syscall.cc"
click node_processes "https://github.com/dizzrt/bigos/blob/main/kernel/core/proc/proc.cc"
click node_vfs "https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/vfs.cc"
click node_bigfs "https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/bigfs.cc"
click node_exfat "https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/exfat.cc"
click node_block_io "https://github.com/dizzrt/bigos/blob/main/kernel/core/block_io.cc"
click node_block_drivers "https://github.com/dizzrt/bigos/tree/main/kernel/drivers/block"
click node_terminal "https://github.com/dizzrt/bigos/blob/main/kernel/core/terminal/tty.cc"
click node_network "https://github.com/dizzrt/bigos/blob/main/kernel/core/net/protocol.cc"
click node_sockets "https://github.com/dizzrt/bigos/blob/main/kernel/core/net/socket.cc"
click node_net_driver "https://github.com/dizzrt/bigos/blob/main/kernel/drivers/net/virtio_net.cc"
click node_init "https://github.com/dizzrt/bigos/blob/main/user/init/init.c"
click node_shell "https://github.com/dizzrt/bigos/blob/main/user/sh/sh.c"
click node_libc "https://github.com/dizzrt/bigos/blob/main/user/libc/syscall.c"
click node_programs "https://github.com/dizzrt/bigos/tree/main/user/bin"
click node_pipe "https://github.com/dizzrt/bigos/blob/main/kernel/core/ipc/pipe.cc"

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_uefi,node_legacy,node_handoff toneBlue
class node_kernel_init,node_interrupts,node_scheduler,node_memory,node_syscalls,node_processes,node_pipe toneAmber
class node_vfs,node_bigfs,node_exfat,node_block_io toneMint
class node_block_drivers,node_terminal,node_network,node_sockets,node_net_driver toneRose
class node_init,node_shell,node_libc,node_programs,node_power toneIndigo
```

## Components

### Boot

- [UEFI loader](https://github.com/dizzrt/bigos/blob/main/kernel/arch/x86/uefi/loader.cc): `kernel/arch/x86/uefi/loader.cc`
- [Legacy boot](https://github.com/dizzrt/bigos/blob/main/kernel/arch/x86/boot/boot.cc): `kernel/arch/x86/boot/boot.cc`
- [Boot handoff](https://github.com/dizzrt/bigos/blob/main/kernel/mm/boot_handoff.cc): `kernel/mm/boot_handoff.cc`

### Kernel runtime

- [Kernel entry](https://github.com/dizzrt/bigos/blob/main/kernel/core/kernel.cc): `kernel/core/kernel.cc`
- [Interrupt dispatch](https://github.com/dizzrt/bigos/blob/main/kernel/core/irq/interrupt.cc): `kernel/core/irq/interrupt.cc`
- [Scheduler](https://github.com/dizzrt/bigos/blob/main/kernel/core/sched/sched.cc): `kernel/core/sched/sched.cc`
- [Memory manager](https://github.com/dizzrt/bigos/blob/main/kernel/mm/memory.cc): `kernel/mm/memory.cc`
- [Syscall dispatcher](https://github.com/dizzrt/bigos/blob/main/kernel/core/syscall/syscall.cc): `kernel/core/syscall/syscall.cc`
- [Process lifecycle](https://github.com/dizzrt/bigos/blob/main/kernel/core/proc/proc.cc): `kernel/core/proc/proc.cc`
- [Pipes](https://github.com/dizzrt/bigos/blob/main/kernel/core/ipc/pipe.cc): `kernel/core/ipc/pipe.cc`

### Storage and I/O

- [VFS](https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/vfs.cc): `kernel/core/fs/vfs.cc`
- [BigFS](https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/bigfs.cc): `kernel/core/fs/bigfs.cc`
- [exFAT](https://github.com/dizzrt/bigos/blob/main/kernel/core/fs/exfat.cc): `kernel/core/fs/exfat.cc`
- [Block I/O](https://github.com/dizzrt/bigos/blob/main/kernel/core/block_io.cc): `kernel/core/block_io.cc`

### Hardware and network

- [Block drivers](https://github.com/dizzrt/bigos/tree/main/kernel/drivers/block): `kernel/drivers/block`
- [TTY and console](https://github.com/dizzrt/bigos/blob/main/kernel/core/terminal/tty.cc): `kernel/core/terminal/tty.cc`
- [Network protocols](https://github.com/dizzrt/bigos/blob/main/kernel/core/net/protocol.cc): `kernel/core/net/protocol.cc`
- [Sockets](https://github.com/dizzrt/bigos/blob/main/kernel/core/net/socket.cc): `kernel/core/net/socket.cc`
- [Virtio network](https://github.com/dizzrt/bigos/blob/main/kernel/drivers/net/virtio_net.cc): `kernel/drivers/net/virtio_net.cc`

### Userland

- [PID 1 init](https://github.com/dizzrt/bigos/blob/main/user/init/init.c): `user/init/init.c`
- [Shell](https://github.com/dizzrt/bigos/blob/main/user/sh/sh.c): `user/sh/sh.c`
- [User libc](https://github.com/dizzrt/bigos/blob/main/user/libc/syscall.c): `user/libc/syscall.c`
- [User programs](https://github.com/dizzrt/bigos/tree/main/user/bin): `user/bin`

### Other components

- **Platform**

## Connections

- Platform → UEFI loader: starts
- Platform → Legacy boot: starts
- UEFI loader → Boot handoff: passes boot data
- Legacy boot → Boot handoff: passes boot data
- Boot handoff → Kernel entry: hands off
- Kernel entry → Scheduler: starts
- Kernel entry → Interrupt dispatch: initializes
- Kernel entry → Memory manager: initializes
- Interrupt dispatch → Syscall dispatcher: dispatches
- Syscall dispatcher → Process lifecycle: dispatches
- Syscall dispatcher → VFS: calls
- Syscall dispatcher → Pipes: calls
- Syscall dispatcher → Sockets: calls
- Process lifecycle → Memory manager: maps user space
- Process lifecycle → VFS: loads executable
- VFS → BigFS: routes filesystem access
- VFS → exFAT: routes filesystem access
- BigFS → Block I/O: reads and writes
- exFAT → Block I/O: reads
- Block I/O → Block drivers: dispatches requests
- TTY and console → Interrupt dispatch: receives keyboard IRQ
- Sockets → Network protocols: uses protocols
- Network protocols → Virtio network: sends and receives
- PID 1 init → User libc: uses
- User libc → Syscall dispatcher: issues calls
- PID 1 init → Shell: starts and restarts
- Shell → User programs: executes
- User programs → User libc: uses
