Design

Plan 9 is the baseline.

VectraOS keeps Plan 9's model whole and changes it only to evolve it. It's written in standard C23, not Plan 9's own C dialect.

Kept whole
  • Per-process namespaces built with bind and mount
  • Everything a file; one process table under /proc
  • Notes, exit strings, /srv, /dev/cons
  • rc as the shell language
  • Text is UTF-8, handled a rune at a time
Evolved
  • A capability micro-kernel instead of a monolithic one
  • Lock-free shared-memory rings for every fast path
  • 9Px: 9P extended for POSIX semantics, mapped files and bulk data by reference
  • The terminal/CPU-server split, grown into a swarm of heterogeneous machines

Dropping a Plan 9 property needs an architecture decision record that says why the change is better, not just different.

Four layers

The system map

The kernel

Address spaces, VMOs, threads, scheduling contexts, handles and rights, ports, channels, rings, and the IRQ, MMIO and DMA-domain objects that let drivers live in user space. It is meant to fit in a weekend of reading.

System servers

svcd starts and restarts services. devmgr finds devices and hands each driver only what its device needs. procfs, nsd, netd and fsd serve the process table, namespaces, the network and storage.

Libraries

musl with a VectraOS back end for the POSIX personality, the 9Px client and server framework, and libvx, the native API straight on the kernel and file servers.

Applications

Native C23 programs, Lua scripts, agents, and POSIX ports such as LLVM, Python and Git.

Normative

The thirteen design rules

A design that breaks one needs an architecture decision record explaining why.

#Rule
01The kernel has four jobs: address spaces, threads and scheduling, capabilities, and notification and transfer. Anything that could run as a process does.
02Files are for control and discovery; rings are for bulk. A ring is never the only way to reach a service.
03The namespace is the authority. A process can name only what it has been given. There is no ambient authority.
04One wait. Every event source delivers into a port, and one call waits on all of them.
05Time is an absolute deadline with a leeway. No timer-resolution setting, no sleep-in-a-loop.
06Threads declare intent, or reserve whole cores; never priorities or affinity masks.
07Buffers have one currency: a memory object, a format descriptor and a timeline fence, shared by CPU, GPU, NPU, display, video, network and disk.
08Nothing on the frame path waits for a client.
09No main thread, no modal loops and no global locks in any protocol.
10Data is the interface. State is readable as text in one record format, ndb.
11Batch by default. Hot interfaces take arrays with counts.
12Local first. Nothing leaves the machine, or the user's own swarm, unless a policy says so.
13Start over; don't rebuild the mess. One mechanism per job. No compatibility shims, no portability layers. The POSIX personality is the one exception.
The blueprint

Read it in full

The design lives in the repository. Everything after the current milestone is provisional: it sets the intended shape, and each part is rewritten against real code when its milestone starts.

DocContents
00 OverviewVision, the design rules, the system map, key decisions
01 Kernel and IPCKernel objects, capabilities, ring IPC, memory, user-space drivers, scheduling, the POSIX personality
02 Namespaces and swarm9Px, namespaces, the canonical file tree, swarm roles, cpu
03 DesktopVulkan rendering, the window server, hybrid tiling, theming, AI in the desktop
04 ToolchainLanguage policy, build and cross-compilation, the milestones
05 Debuggerdbg: /proc debug files, crash directories, profiling, remote debugging
06 Install and updateSigned reproducible releases, peer-to-peer distribution, trial boots and rollback
07 Native appsA script-free document viewer for the small web; native chat, mail and feed clients
08 Editorhx: Acme's plumbing, sam's structural regular expressions, a modern editor's reach
09 Native APIlibvx, a sketch
10 After POSIXA non-binding vision of development after POSIX
11 StorageThe copy-on-write system volume after 9front's gefs, fsd as pager, FAT and ISO 9660
12 ManualPlan 9's manual sections, in a modernised AmigaGuide
ADRsArchitecture decision records