How jprx/fractal works
Fractal is a UNIX-like operating-system kernel aimed at microarchitecture experiments, with user programs and a familiar C-library interface. The principal workflow is a program calling libc, entering the kernel through a system call, and being launched or scheduled as a task; filesystem and executable-loading stages support booting userspace from an initrd. Separate branches capture the documented experimental primitives, architecture and device support, and Oxide graphical interface. Relationships are limited to README statements and visible source references; several implementation paths were not sampled, so uncertain links are omitted or marked dashed.
Main entry points: syscalls.c Fractal libc · spawn.cc Spawn and exec · pci.cc PCI discovery · syscall.h System-call API
Components 22
User interface
- User programs
- Fractal libc
libc/fractal/syscalls.c - System-call API
inc/syscall.h
Execution and memory
- System-call dispatch
src/syscall/dispatch.c - Spawn and exec
src/syscall/spawn.cc - Tasks and scheduler
src/task.cc - Virtual memory
src/paging.cc - File mappings
inc/fmap.h - Gigamap
src/paging.cc - Ultrathreads
libc/fractal/ultrathread.c
Files and loading
- ELF loader
src/loader/elf.c - Ext2 filesystem
src/filesys/ext2/ext2.cc - File I/O
inc/filesys/fileio.h - Initrd image
Platform and devices
- CPU architectures
src/arch/arm/cpu.cc - Interrupt handling
src/arch/x86/idt.cc - PCI discovery
src/io/pci/pci.cc - VirtIO graphics
src/io/gpu/virtio/virtio-gpu.cc - Keyboard and mouse
inc/io/hid/input.h
Oxide desktop
- Oxide compositor
src/oxide/compositor.cc - Windows
src/oxide/window.cc - Blur effects
src/oxide/blur.c
Connections 17
- User programs → Fractal libc: calls
- Fractal libc → System-call API: issues calls
libc/fractal/syscalls.c - System-call API → System-call dispatch: dispatched to
- System-call dispatch → Spawn and exec: routes spawn
- Spawn and exec → Tasks and scheduler: creates tasks
- Spawn and exec → ELF loader: loads executable
- Initrd image → Ext2 filesystem: contains filesystem
- Ext2 filesystem → File I/O: provides file access
- Tasks and scheduler → Virtual memory: uses address spaces
- Fractal libc → Gigamap: exposes primitive
libc/fractal/syscalls.c - Fractal libc → Ultrathreads: exposes primitive
- PCI discovery → VirtIO graphics: initializes device
src/io/pci/pci.cc - PCI discovery → Keyboard and mouse: initializes device
src/io/pci/pci.cc - VirtIO graphics → Oxide compositor: supplies graphics
- Oxide compositor → Windows: renders windows
src/oxide/window.cc - Windows → Blur effects: uses effects
- CPU architectures → Interrupt handling: architecture support