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

uBixOS is a monolithic 64-bit kernel that runs on ARM64 (aarch64) — the primary architecture — and x86_64. The arch-neutral scheduler uses a 32-level priority bitmap, making "find the highest priority runnable task" a single bit-scan. Scheduling is O(1) regardless of how many tasks are sleeping, and the dispatch path is SMP-safe.

  • 32-level QoS priority bitmap (O(1) dequeue)
  • Real-time, interactive, and background tiers
  • Preemptive via the per-CPU generic / LAPIC timer
  • Per-task FPU/SIMD (SSE / NEON) state saved across switches
  • POSIX fork with copy-on-write; exec into a fresh address space
  • Process groups, session leader, tcsetpgrp
aarch64 + x86_64 64-bit long mode / EL1 bitmask O(1) SMP-safe dispatch QoS tiers

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 — on either CPU architecture from one codebase.
🧭 64-BIT & MULTI-ARCHITECTURE

uBixOS 3.0 is the 64-bit era. After 20+ years on i386, the kernel and userland were split cleanly into machine-independent code and a thin per-architecture layer, and 32-bit i386 was retired to a legacy branch. One source tree now boots two 64-bit CPUs to the same graphical desktop — and real ARM hardware is the next step.

  • ARM64 (aarch64) — primary target: QEMU virt, GICv2, generic timer, virtio devices
  • x86_64 — long mode, higher-half kernel + physmap, APIC, syscall/sysret, virtio + AC'97
  • Shared machine-independent kernel: scheduler, VFS, VMM, MPI, signals, lwIP, Views compositor, the whole musl world
  • ELF64 loader + ld-musl dynamic linker shared across arches via a handful of MD hooks
  • Real-hardware ARM bring-up underway — Raspberry Pi 3 (BCM2837) board in hand
aarch64 primary x86_64 MI / MD split higher-half + physmap i386 → releng/2

Because the split is honest, a feature written once — COW fork, sockets, pthreads, the browser — lands on both architectures, and porting to a new board becomes a question of drivers and a boot path, not a rewrite.
🧠 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.

  • Native UbixFS pool as root; FAT16/FAT32 read/write
  • VFS abstraction layer (vnode-based)
  • procfs — /proc/<pid>/status, maps, cmdline, per-core /proc/stat
  • virtio-blk backend on both 64-bit arches; devfs + ramfs
  • 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.
🧵 THREADS & CONCURRENCY

uBixOS runs real musl pthreads. pthread_create maps to the kernel's rfork with the CLONE bits musl needs, a futex syscall backs every mutex / condvar / semaphore, and each thread carries its own thread-local storage.

  • pthread_create / pthread_join / pthread_mutex / pthread_cond
  • futex (WAIT / WAKE / REQUEUE) over the kernel wait-channel primitive
  • Per-thread TLS re-installed on every context switch
  • Detached threads via a native thread_exit_unmap (musl's __unmapself)
  • membarrier; CLONE SETTLS / PARENT_SETTID / CHILD_CLEARTID
musl pthreads futex rfork + CLONE per-thread TLS

A multi-threaded program with a mutex-guarded counter, condition variables, and joins runs unmodified — the same pthread API you'd use on Linux, on a kernel built from scratch.
🔐 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
  • 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 authenticates over MPI
BearSSL 0.6 TLS 1.2 ChaCha20 CSPRNG PBKDF2-SHA256

The full HTTPS path runs end-to-end on a from-scratch kernel: DNS → TCP → TLS 1.2 handshake → certificate validation → HTTP response — feeding both httpsget and the browser.
🕸️ WEB BROWSER

uBixOS runs NetSurf, a real web browser, as a native windowed application on all three architectures. It fetches pages over HTTP/HTTPS, lays out and renders HTML/CSS on the Views framebuffer, decodes images, and executes JavaScript.

  • HTML/CSS layout and rendering through libhubbub / libdom / libcss + libnsfb on objGFX
  • 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
  • Runs on i386, aarch64, and x86_64 — eight browser core libraries vendored
NetSurf Duktape JS stb_image PNG/JPEG libnsfb / objGFX

A homebrew OS that boots, joins a network, negotiates TLS, and renders a real web page with working JavaScript — a milestone in the same league as running Doom. The same kernel runs the scheduler, the lwIP stack, and the browser's JS engine together.
🔊 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)
  • Modern flat window chrome with antialiased TrueType fonts
  • Linear-framebuffer rendering with runtime resolution switching from Settings
  • 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 over a virtio-net driver, with a real BSD sockets API exposed to userland. It DHCPs at boot, configures via the registry and the Settings Network pane, and drives everything from command-line tools to the NetSurf browser.

  • In-kernel lwIP over virtio-net (64-bit) and e1000 + NE2000/RTL8029 (i386) drivers
  • BSD sockets: socket / connect / bind / listen / accept / send / recv
  • DNS resolution — ping <hostname> via gethostbyname()
  • DHCP and static (IP / netmask / gateway / DNS) configuration
  • wget, httpsget (BearSSL TLS), and nc in the desktop terminal
  • select / poll over a pty + socket, so interactive net apps wake on keystrokes
  • Kernel auto-DHCPs at boot — networking works even if userland config fails
lwIP + virtio-net BSD sockets DHCP / static wget / httpsget / nc

The full path is live: a userland socket call goes through lwIP and out the virtio NIC, a TLS httpsget fetches over HTTPS, and NetSurf pulls a page down and renders it in a window.
📦 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.