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 with maximize / edge-snap / minimize and live resize
  • Modern flat (Windows 11-style) chrome: shadows, rounded corners, rasterized title-bar glyphs
  • Flat taskbar + start menu with start icon, date clock, volume tray, and hover feedback
  • Antialiased TrueType fonts (stb_truetype, DejaVuSans/Mono) across titles, taskbar, Settings, login, and Tessera
  • Runtime resolution switching (VBE enumerate + live mode change) from Settings
  • Compositor caches the desktop and repaints only the dragged region; prefers a 32bpp LFB
  • Doom and Tessera run windowed inside the compositor
flat modern chrome AA TrueType fonts VESA live resize alpha blending

The same compositor that draws the login screen and taskbar keeps Doom's window on screen while the browser renders a page in another — all arbitrated by the kernel scheduler, now with antialiased fonts and a modern flat look.
🎨 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, IRQ-driven (e1000 + NE2000/RTL8029 drivers on newbus)
  • net_configure() syscall (slot 59) applied on the tcpip thread
  • DHCP and static (IP / netmask / gateway / DNS) configuration
  • DNS resolution — ping <hostname> via gethostbyname()
  • libhttp — reusable HTTP/1.0 + HTTPS client with redirect following
  • Kernel auto-DHCPs at boot — networking works even if userland config fails
lwIP stack e1000 + NE2000 DHCP / static DNS + libhttp

Both NICs are IRQ-driven with real sleep/wakeup — no busy-polling. On top of the stack, libhttp fetches plain HTTP and HTTPS (with redirects), the same fetcher the browser uses.
🔐 TLS & CRYPTO

uBixOS has a real cryptographic stack: BearSSL for TLS, a kernel CSPRNG for entropy, and PBKDF2-hashed passwords. An https:// fetch validates the certificate chain, hostname, and expiry against real wall-clock time.

  • BearSSL 0.6 (libbearssl.so) — constant-time scalar build for the -mno-sse tree
  • TLS 1.2 with a 121-CA trust store and X.509 chain / hostname / expiry validation
  • Kernel ChaCha20 fast-key-erasure CSPRNG; getrandom(2) / getentropy()
  • Salted PBKDF2-HMAC-SHA256 passwords (50,000 iterations) — no plaintext on the image
  • authd verifies via constant-time compare; login is unchanged (authenticates over MPI)
BearSSL 0.6 TLS 1.2 ChaCha20 CSPRNG PBKDF2-SHA256

With the kernel wall-clock fix in place, an HTTPS fetch now runs end-to-end: DNS → TCP → TLS 1.2 handshake → certificate validation → HTTP response — on a kernel written from scratch.
🌐 WEB BROWSER

uBixOS runs NetSurf, a real web browser — vendored and built as part of bmake world. It fetches pages over HTTP/HTTPS, lays out and renders HTML/CSS on the framebuffer, decodes images, and executes JavaScript.

  • HTML/CSS layout and rendering on the Views framebuffer
  • JavaScript via the Duktape engine (nsgenbind-generated DOM bindings)
  • PNG + JPEG images decoded through stb_image (no libpng/libjpeg)
  • HTTP/HTTPS fetcher built on libhttp + BearSSL
  • Pointer + keyboard input; launches from the Applications start menu
  • Eight browser core libraries vendored, with libnsfb on a uBixOS objGFX backend
NetSurf Duktape JS stb_image PNG/JPEG libnsfb / objGFX

A homebrew x86 OS that boots, connects to a network, negotiates TLS, and renders a real web page with working JavaScript. The same kernel runs the scheduler, the lwIP stack, and the browser’s JS engine together.
🧮 SMP (MULTI-CORE)

uBixOS is growing multi-processor support. The boot processor maps the LAPIC and brings up the application processors, which adopt the kernel address space and run per-CPU idle loops in parallel — the foundation for a multi-core scheduler.

  • LAPIC mapped; BSP registered and APs brought up at boot
  • APs enable paging, adopt the kernel address space, run per-CPU idle loops
  • Per-CPU state (struct pcpu, curcpu()) via a per-CPU GDT segment in %gs
  • True spinning locks (spinLockIrq / spinUnlockIrq)
  • Software task-switch path saving/restoring segment registers (SMP prerequisite)
LAPIC + APs per-CPU %gs spinlocks

Multiple cores are alive and idling in parallel today; per-CPU current-task handling and a parallel run queue are the active work toward a fully multi-core scheduler.
📦 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.