Skip to content

Architecture

A pragmatic microkernel

The kernel manages only the critical resources. Drivers, the file system, networking and the graphical compositor are user processes that talk through IPC and hold only the capabilities they were given.

Boot sequence: UEFI → AriBoot → AriKernel → AriInit → services → arish. AriKernel runs in ring 0; init, services and shell run in ring 3.

Boot

From firmware to kernel, with no BIOS

AriCodeOS starts directly in UEFI. Its own loader, AriBoot, reads the A/B slot state, collects the framebuffer, the ACPI tables and the memory map, verifies the kernel and the initrd and hands over a versioned BootInfo structure before leaving the firmware behind.

UEFI firmware

Loads BOOTX64.EFI from the system partition. No real mode, no MBR, no CSM.

AriBoot

Chooses the slot, gets GOP, ACPI and the memory map, verifies kernel and initrd, builds the physical map and calls ExitBootServices.

AriKernel

Installs GDT, TSS and IDT, takes over memory, calibrates the APIC timer, starts the other CPUs and enables the IOMMU.

AriInit

The first user process: device manager, capability broker and service supervisor.

Drivers and services

Storage, file service, network, input and compositor, each in its own address space.

arish and applications

The shell and the applications, launched by the broker with the capabilities in their manifest.

Kernel

What lives in ring 0

Only the mechanisms that cannot be delegated. Policy, protocols and devices stay outside.

  • Preemptive scheduler, threads and SMP: INIT-SIPI, per-CPU state, IPIs and TLB shootdown
  • Virtual memory: one page table per process, NX by default, W^X and guard pages
  • Physical memory with a bitmap allocator and a kernel heap that grows on demand
  • Interrupts: GDT, TSS, IDT, local APIC, I/O APIC, MSI and MSI-X
  • Kernel objects reached by handle, with a generation and a rights mask
  • IPC endpoints with deadlines and handle transfer
  • Capabilities that can be delegated and revoked

User space

Services and drivers, one process each

A driver failure is not a kernel failure: a driver can be killed and restarted without a kernel panic.

AriInit

Reads each application's manifest and hands out only the handles requested; supervises services and restarts them with growing backoff.

Drivers

virtio-blk, virtio-net, virtio-input, xHCI with USB HID and mass storage, Realtek r8169. Each gets only its MMIO region, its interrupt and authorised DMA buffers.

AriFS

A file service over IPC: a private directory per application, CRC32 on every block, copy-on-write replace of files up to 16 MiB, a table in two copies and end-to-end flush (AriFS v2).

Network

A shared network core with DHCP, ARP, ICMP, UDP, TCP and DNS, an HTTP and HTTPS (TLS 1.3) client and an SSH server.

Compositor

Owns the framebuffer. Applications draw into their own buffers, two per window so no frame is shown half drawn, and receive input only when their window has focus. With the desktop profile, it draws the window frames, the bar, the dock and the programs’ menus itself, so a program cannot paint over them or pass for another.

arish

Interactive shell on the serial port, PS/2, USB or virtio keyboards: ps, mem, cpus, services, net, ping, http, run, diag and more.

Applications

Native programs and WebAssembly modules

Native

A native program is a static ring 3 ELF built with the SDK. Applications built outside the source tree are packaged, signed with Ed25519 and installed in AriFS by a trusted installer that replaces them atomically, chunk by chunk.

WebAssembly

Portable programs are WebAssembly modules run by an in-house interpreter. Each module is validated before it runs, declares its own manifest and sees only the Capability API — deliberately not WASI.

Compatibility

Old software on top, never inside

Linux compatibility is planned as an isolated personality server in user space, starting with static ELF binaries and a small set of system calls — enough to run programs built by the AriCode compiler without touching the kernel. Windows software, if it ever comes, would run in a virtual machine.