# yo-yo-ooo/skylinesystem architecture

> Architecture diagram of the GitHub repository yo-yo-ooo/skylinesystem, 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/yo-yo-ooo/skylinesystem
- Repository: https://github.com/yo-yo-ooo/skylinesystem

## Overview

SkylineSystem is a hobby x86_64 SMP operating system with a separate userspace, kernel services, storage and device support, and a graphical desktop. The principal user path is boot into the kernel, start the desktop, interact with a window or app, and have the kernel provide scheduling, memory, input and display services. The graph also preserves documented networking and SAF archive capabilities. Some subsystem links reflect README descriptions; unsampled implementation details and call relationships are intentionally not asserted.

Main entry points: [`kernel/src/main.cpp`](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/main.cpp) (Kernel startup), [`programs/desktop/main.cpp`](https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/desktop/main.cpp) (Desktop and window manager), [`kernel/src/fs/fc.cpp`](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/fc.cpp) (Filesystem services), [`programs/notepad/main.cpp`](https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/notepad/main.cpp) (Notepad app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Kernel and Memory"]
  node_kernel["Kernel startup<br/>[main.cpp]"]
  node_scheduler["EEVDF scheduler<br/>[sched.cpp]"]
  node_ripfeedback["RIP feedback<br/>[sched_rip.cpp]"]
  node_vmm["Virtual memory<br/>[vmm.cpp]"]
  node_pmm["Physical memory<br/>[pmm.cpp]"]
  node_heap["Kernel heap<br/>[slub.cpp]"]
  node_syscalls["System calls<br/>[syscall.cpp]"]
end

subgraph group_io["Devices and Storage"]
  node_drivers["Device drivers"]
  node_input["Input devices<br/>[kbd.cpp]"]
  node_filesystems["Filesystem services<br/>[fc.cpp]"]
  node_ext4["ext4 filesystem<br/>[ext4.cpp]"]
  node_safkernel["SAF support<br/>[saf.cpp]"]
  node_network["TCP/IP stack"]
end

subgraph group_desktop["Desktop and Apps"]
  node_desktop["Desktop and window manager<br/>[main.cpp]"]
  node_compositor["Software compositor<br/>[window.h]"]
  node_ttf["Font rendering<br/>[ttf.c]"]
  node_notepad["Notepad app<br/>[main.cpp]"]
end

subgraph group_runtime["Runtime Libraries"]
  node_libc["Userspace library"]
  node_safformat["SAF archive format<br/>[saf.h]"]
  node_safmake["SAF archive maker<br/>[saf-make.c]"]
  node_safextract["SAF archive extractor<br/>[saf-extract.c]"]
  node_memmove["AVX memory operations<br/>[memmove.c]"]
  node_intrinsics["AVX intrinsics<br/>[avx2intrin.h]"]
  node_intrinsics512["AVX-512 intrinsics<br/>[avx512fintrin.h]"]
  node_intrinsicsbase["AVX intrinsics base<br/>[avxintrin.h]"]
end

node_bootloader(("Limine bootloader"))
node_hardware(("Machine hardware"))
node_users(("Desktop user"))

node_bootloader -->|"provides boot data"| node_kernel
node_hardware -.->|"starts on"| node_kernel
node_kernel -.->|"runs scheduling"| node_scheduler
node_scheduler -->|"adjusts quantum"| node_ripfeedback
node_kernel -.->|"provides paging"| node_vmm
node_kernel -.->|"manages physical pages"| node_pmm
node_kernel -.->|"provides heap"| node_heap
node_kernel -.->|"exposes services"| node_syscalls
node_kernel -.->|"initializes devices"| node_drivers
node_drivers -->|"feeds input core"| node_input
node_kernel -.->|"provides file access"| node_filesystems
node_filesystems -.->|"supports ext4"| node_ext4
node_filesystems -.->|"supports SAF"| node_safkernel
node_kernel -.->|"includes networking"| node_network
node_users -->|"interacts with"| node_desktop
node_desktop -->|"requests services"| node_syscalls
node_desktop -->|"composes windows"| node_compositor
node_desktop -.->|"renders text"| node_ttf
node_desktop -.->|"launches app"| node_notepad
node_notepad -->|"reads shared events"| node_input
node_notepad -->|"draws text"| node_ttf
node_desktop -.->|"uses userspace runtime"| node_libc
node_safmake -->|"writes format"| node_safformat
node_safextract -->|"reads format"| node_safformat
node_memmove -->|"includes intrinsics"| node_intrinsicsbase
node_intrinsicsbase -->|"includes"| node_intrinsics
node_intrinsicsbase -->|"includes"| node_intrinsics512

click node_kernel "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/main.cpp"
click node_scheduler "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/sched.cpp"
click node_ripfeedback "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/sched_rip.cpp"
click node_vmm "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/vmm/vmm.cpp"
click node_pmm "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/mem/pmm.cpp"
click node_heap "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/mem/slub.cpp"
click node_syscalls "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/syscall.cpp"
click node_drivers "https://github.com/yo-yo-ooo/skylinesystem/tree/main/kernel/src/drivers"
click node_input "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/drivers/input/kbd.cpp"
click node_filesystems "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/fc.cpp"
click node_ext4 "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/lwext4/src/ext4.cpp"
click node_safkernel "https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/saf/saf.cpp"
click node_network "https://github.com/yo-yo-ooo/skylinesystem/tree/main/kernel/src/net"
click node_desktop "https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/desktop/main.cpp"
click node_compositor "https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/desktop/include/synthesizer/window.h"
click node_ttf "https://github.com/yo-yo-ooo/skylinesystem/blob/main/lib/base/font/ttf.c"
click node_notepad "https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/notepad/main.cpp"
click node_libc "https://github.com/yo-yo-ooo/skylinesystem/tree/main/lib"
click node_safformat "https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf.h"
click node_safmake "https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf-make.c"
click node_safextract "https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf-extract.c"
click node_memmove "https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/memmove.c"
click node_intrinsics "https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avx2intrin.h"
click node_intrinsics512 "https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avx512fintrin.h"
click node_intrinsicsbase "https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avxintrin.h"

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_kernel,node_scheduler,node_ripfeedback,node_vmm,node_pmm,node_heap,node_syscalls,node_users toneBlue
class node_drivers,node_input,node_filesystems,node_ext4,node_safkernel,node_network toneAmber
class node_desktop,node_compositor,node_ttf,node_notepad toneMint
class node_libc,node_safformat,node_safmake,node_safextract,node_memmove,node_intrinsics,node_intrinsics512,node_intrinsicsbase toneRose
class node_bootloader,node_hardware toneIndigo
```

## Components

### Kernel and Memory

- [Kernel startup](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/main.cpp): `kernel/src/main.cpp`
- [EEVDF scheduler](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/sched.cpp): `kernel/src/arch/x86_64/schedule/sched.cpp`
- [RIP feedback](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/sched_rip.cpp): `kernel/src/arch/x86_64/schedule/sched_rip.cpp`
- [Virtual memory](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/vmm/vmm.cpp): `kernel/src/arch/x86_64/vmm/vmm.cpp`
- [Physical memory](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/mem/pmm.cpp): `kernel/src/mem/pmm.cpp`
- [Kernel heap](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/mem/slub.cpp): `kernel/src/mem/slub.cpp`
- [System calls](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/arch/x86_64/schedule/syscall.cpp): `kernel/src/arch/x86_64/schedule/syscall.cpp`

### Devices and Storage

- [Device drivers](https://github.com/yo-yo-ooo/skylinesystem/tree/main/kernel/src/drivers): `kernel/src/drivers`
- [Input devices](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/drivers/input/kbd.cpp): `kernel/src/drivers/input/kbd.cpp`
- [Filesystem services](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/fc.cpp): `kernel/src/fs/fc.cpp`
- [ext4 filesystem](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/lwext4/src/ext4.cpp): `kernel/src/fs/lwext4/src/ext4.cpp`
- [SAF support](https://github.com/yo-yo-ooo/skylinesystem/blob/main/kernel/src/fs/saf/saf.cpp): `kernel/src/fs/saf/saf.cpp`
- [TCP/IP stack](https://github.com/yo-yo-ooo/skylinesystem/tree/main/kernel/src/net): `kernel/src/net`

### Desktop and Apps

- [Desktop and window manager](https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/desktop/main.cpp): `programs/desktop/main.cpp`
- [Software compositor](https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/desktop/include/synthesizer/window.h): `programs/desktop/include/synthesizer/window.h`
- [Font rendering](https://github.com/yo-yo-ooo/skylinesystem/blob/main/lib/base/font/ttf.c): `lib/base/font/ttf.c`
- [Notepad app](https://github.com/yo-yo-ooo/skylinesystem/blob/main/programs/notepad/main.cpp): `programs/notepad/main.cpp`

### Runtime Libraries

- [Userspace library](https://github.com/yo-yo-ooo/skylinesystem/tree/main/lib): `lib`
- [SAF archive format](https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf.h): `res/saf/saf.h`
- [SAF archive maker](https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf-make.c): `res/saf/saf-make.c`
- [SAF archive extractor](https://github.com/yo-yo-ooo/skylinesystem/blob/main/res/saf/saf-extract.c): `res/saf/saf-extract.c`
- [AVX memory operations](https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/memmove.c): `ablib/arch/x86_64/x86mem/memmove.c`
- [AVX intrinsics](https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avx2intrin.h): `ablib/arch/x86_64/x86mem/avx2intrin.h`
- [AVX-512 intrinsics](https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avx512fintrin.h): `ablib/arch/x86_64/x86mem/avx512fintrin.h`
- [AVX intrinsics base](https://github.com/yo-yo-ooo/skylinesystem/blob/main/ablib/arch/x86_64/x86mem/avxintrin.h): `ablib/arch/x86_64/x86mem/avxintrin.h`

### Other components

- **Limine bootloader**
- **Machine hardware**
- **Desktop user**

## Connections

- Limine bootloader → Kernel startup: provides boot data (evidence: `kernel/src/main.cpp`)
- Machine hardware → Kernel startup: starts on
- Kernel startup → EEVDF scheduler: runs scheduling
- EEVDF scheduler → RIP feedback: adjusts quantum
- Kernel startup → Virtual memory: provides paging
- Kernel startup → Physical memory: manages physical pages
- Kernel startup → Kernel heap: provides heap
- Kernel startup → System calls: exposes services
- Kernel startup → Device drivers: initializes devices
- Device drivers → Input devices: feeds input core
- Kernel startup → Filesystem services: provides file access
- Filesystem services → ext4 filesystem: supports ext4
- Filesystem services → SAF support: supports SAF
- Kernel startup → TCP/IP stack: includes networking
- Desktop user → Desktop and window manager: interacts with
- Desktop and window manager → System calls: requests services (evidence: `programs/desktop/main.cpp`)
- Desktop and window manager → Software compositor: composes windows
- Desktop and window manager → Font rendering: renders text
- Desktop and window manager → Notepad app: launches app
- Notepad app → Input devices: reads shared events (evidence: `programs/notepad/main.cpp`)
- Notepad app → Font rendering: draws text (evidence: `programs/notepad/main.cpp`)
- Desktop and window manager → Userspace library: uses userspace runtime
- SAF archive maker → SAF archive format: writes format (evidence: `res/saf/saf-make.c`)
- SAF archive extractor → SAF archive format: reads format (evidence: `res/saf/saf-extract.c`)
- AVX memory operations → AVX intrinsics base: includes intrinsics (evidence: `ablib/arch/x86_64/x86mem/memmove.c`)
- AVX intrinsics base → AVX intrinsics: includes (evidence: `ablib/arch/x86_64/x86mem/x86mem.h`)
- AVX intrinsics base → AVX-512 intrinsics: includes (evidence: `ablib/arch/x86_64/x86mem/x86mem.h`)
