FEATURES
// WHAT LIVES INSIDE THE KERNEL
⚡ KERNEL & SCHEDULER

uBixOS is a monolithic kernel targeting i386 (IA-32). The scheduler uses a 32-level priority bitmap — a bitmask approach that makes "find the highest priority runnable task" a single bsf instruction. Scheduling is O(1) regardless of how many tasks are sleeping.

  • 32-level QoS priority bitmap (O(1) dequeue)
  • Real-time, interactive, and background tiers
  • Preemptive via PIT timer ISR
  • Per-task ring-0 kernel stacks (8 KiB each)
  • POSIX fork/exec with full address space clone
  • Process groups, session leader, tcsetpgrp
i386 monolithic PIT timer ISR bitmask O(1) QoS_REALTIME QoS_BACKGROUND

The same scheduler runs the interactive shell, the Doom game loop, and the background pageout daemon simultaneously — each at its own priority tier, none of them blocking the others.
🧠 VIRTUAL MEMORY (VMM)

The VMM has been overhauled from a flat array of VMAs to a red-black tree, matching the architecture of FreeBSD's vm_map and Linux's mm_struct. Every page fault, mmap, and munmap is now O(log n).

  • RB-tree VMA lookup (O(log n) mmap / munmap / page fault)
  • Demand-zero anonymous pages — mmap reserves, fault backs
  • Copy-on-write fork (COW pages)
  • Swap partition integration (64 MB, clock-algorithm eviction)
  • Background pageout daemon (polls every 100 ticks)
  • MAP_FIXED and MAP_ANON fully supported
rbtree.c intrusive RB tree vm_map_t embedded in kTask_t swap.c clock eviction pageout.c daemon

The pageout daemon wakes every 100 scheduler ticks, iterates the task list, switches CR3 per task, and evicts pages until free memory is above the high watermark — all without stopping the rest of the system.
📁 FILESYSTEM

uBixOS boots from FAT-formatted disk images and exposes a POSIX-compatible VFS layer. procfs provides runtime process introspection without a separate process.

  • FAT16/FAT32 read/write
  • VFS abstraction layer (vnode-based)
  • procfs — /proc/<pid>/status, maps, cmdline
  • IDE (ATA) and USB mass storage backends
  • 8.3 short names + LFN long filename support
procfs lets ps, top, and the shell read process state directly from the kernel through normal file reads — no extra syscall needed.
🔌 USB STACK

A hand-written UHCI host controller driver handles USB enumeration, descriptor parsing, and two device classes: HID keyboards and bulk mass storage (BBB protocol).

  • UHCI host controller driver
  • USB hub enumeration
  • HID keyboard class (interrupt transfers)
  • Mass storage class — BBB protocol over bulk endpoints
  • FAT filesystem on USB drives
UHCI spec HID class BBB bulk-only

Boot the OS, plug in a USB keyboard — it starts working. Plug in a USB flash drive — mount it and read files. All on a kernel written from scratch.
🔊 SOUND

The Intel AC97 audio codec driver uses DMA ring buffers to stream PCM audio without CPU intervention. Doom's music and sound effects play through the same driver.

  • Intel AC97 codec (ICH-compatible)
  • DMA ring buffer playback
  • 16-bit stereo PCM output
  • Doom SFX + music (OPL2 emu via libsound)
AC97 is the audio standard found on virtually every x86 PC from 1997 to 2007. Making it work means Doom's "At Doom's Gate" plays on real hardware.
🖥️ VIEWS COMPOSITOR

Views is uBixOS's windowing compositor. It supports overlapping windows, a taskbar with an application launcher, a login screen, and per-pixel alpha blending for window chrome.

  • Overlapping, movable windows
  • Taskbar with app launcher (Terminal, About, Log Out)
  • Login screen with username prompt
  • VGA framebuffer rendering (320x200 and VESA modes)
  • Doom runs windowed inside the compositor (vdoom)
  • Tessera runs as a windowed GUI application
VGA framebuffer VESA modes alpha blending

The same compositor that draws the login screen and taskbar is the one keeping Doom's window on screen while Tessera runs in another — all arbitrated by the kernel scheduler.
🎨 DESKTOP & THEMING

uBixOS has a configurable, themeable desktop. The wallpaper, background mode, and accent color are all stored per-user in the registry and applied live by the compositor — no reboot, no config files to hand-edit.

  • Background modes: image (stretched wallpaper), solid color, or "jailbars" (four shades from one base)
  • Original procedural wallpapers — synthwave (miami/outrun/mountains/road/vapor) and tropical sets, no third-party assets
  • Per-user accent color drives window title bars and the entire taskbar palette
  • Per-user settings layering — each login resolves its own desktop, falling back to the machine default
  • Live preview thumbnail + Apply button; color modes apply instantly
synthwave defaults RGB accent picker jailbars mode per-user layering

Pick the "miami" wallpaper and a magenta accent, click Apply, and the compositor repaints the desktop while the taskbar re-derives its whole palette from that one color — all the way down to the start-menu flyout.
🗃️ UBISTRY REGISTRY

ubistry is uBixOS's system registry — a hierarchical, typed configuration tree that the desktop, theming, start menu, and network stack all read from. The 2004-era flat key/value store was rewritten into a path-addressed tree persisted to disk and served over MPI.

  • Path-addressed nodes: string / int / bool leaves + ordered containers
  • Persisted as text to /var/db/ubistry.db (boot load, coalesced flush)
  • Real GET / SET / ENUM / DEL request-reply protocol over MPI
  • ubix_api client lib with per-user override resolution
  • ulog() system log — klog_writelogd/var/log/messages
  • Data-driven cascading start menu loaded from /views/startmenu
/var/db/ubistry.db MPI protocol per-user keys

A bare key like views/desktop/mode is the machine default; /users/<name>/views/desktop/mode is a per-user override. The client resolves user-first then falls back — so the daemon stays simple and every app gets layered config for free.
🌐 NETWORKING

uBixOS runs the lwIP TCP/IP stack in-kernel. A UbixOS-native net_configure() syscall lets userland push a network configuration — DHCP or static — into the stack, driven from the registry and the Settings Network pane.

  • In-kernel lwIP TCP/IP stack
  • net_configure() syscall (slot 59) applied on the tcpip thread
  • DHCP and static (IP / netmask / gateway / DNS) configuration
  • bin/netcfg reads /net/* at boot and is re-run by Settings
  • Kernel auto-DHCPs at boot — networking works even if userland config fails
lwIP stack net_configure (slot 59) DHCP / static

Flip Settings → Network to Static, type an address, and click Apply: Settings writes /net/* to the registry and runs netcfg, which calls into the kernel to reconfigure the live lwIP interface.
📦 USERLAND & LIBC

musl libc 1.2.5 provides a full POSIX C standard library. A custom ELF dynamic linker bootstraps shared-library loading at process startup — the same mechanism Linux uses. Every user account defaults to /bin/tcsh, and a busybox 1.36.1 userland fills out the command set.

  • musl libc 1.2.5 (math, stdio, pthreads stubs)
  • ELF dynamic linker (PT_LOAD, PLT/GOT, RELA relocs)
  • tcsh 6.24.16 with tab completion and history
  • busybox 1.36.1 coreutils — grep, find, less, sort, cut, tr, cp, mv, rm, and more
  • busybox vi for in-system text editing
  • FreeBSD syscall ABI compatibility layer
  • POSIX signals: sigaction, SA_SIGINFO, SA_RESTART, sigsuspend
  • procfs-backed ps / top
musl 1.2.5 ELF dynamic linker busybox 1.36.1 FreeBSD ABI tcsh 6.24.16

Running tcsh on a homebrew kernel means tab completion, setenv, job control (Ctrl-Z / fg), and shell scripts all work the way a Unix user expects.
🎮 GAMES

Two fully playable games ship with uBixOS. They're not tech demos — they exercise every layer of the stack: scheduler, VMM, VFS, USB input, AC97 sound, and the Views compositor.

  • DOOM — runs fullscreen or windowed via vdoom; AC97 audio, USB keyboard input, WAD loaded from FAT disk
  • Tessera — Tetris-inspired puzzle game written for the Views GUI; windowed, keyboard-controlled, score display
Getting Doom running is an informal benchmark for OS completeness: you need a working C runtime, dynamic memory, keyboard input, graphics output, file I/O, and a timer. uBixOS passes all of them.