nos_
ENRU

Documentation

The nos reference: how each subsystem works and how to build, run, test and debug the kernel. It's generated from the repository's docs/ on every deploy.

Start here

How it works

BootHow nos boots on both architectures, from GRUB/Multiboot2 or the Linux Image protocol all the way to boot: complete, and how the other CPUs start.Paging and memoryHow memory works: the early linear map, the real page tables, the page and heap allocators, MMIO, W^X and TLB shootdowns.NUMAMachines of several sockets: where the kernel learns which memory is near which CPUs, free pages kept by node, the scheduler's preference, VMs placed on a node, and what it measured on a two-socket server.SchedulerPer-CPU run queues, the context switch, preemption, blocking and load balancing.InterruptsHow interrupts are routed: IDT and IOAPIC, MSI-X, GICv3 and the ITS, IPIs, NMIs, IRQ balancing and deferred work.ProfilerSampling on a performance counter or the tick, and how to read a profile report.HTTPSHow wget https:// works: rustls without the standard library, certificates, and what it costs.RandomnessThe ChaCha20 random pool, where its entropy comes from on each machine, and how much timing jitter is worth.Rust in the kernelHow the Rust crates are layered, how kernel services reach Rust, the safe types that replace unsafe code, and how to write a driver.FilesystemsThe root filesystem and root=, the file API, how the ext2 driver writes data, and how to make and check a root image.The host APIWhat nos is managed through by programs: the management bus served over TLS 1.3 to clients let in by their keys, its routes, stream and roles, and the management panel.The management busWhere the kernel's layers and modules answer by name what the host API asks: providers, methods, descriptors, calls and jobs.Loadable modulesKernel services in Rust, built into .ko files and put into a running kernel with insmod: writing, building, loading.netblkA module that serves an NVMe disk over UDP with zero copies in both directions, and how it compares with Linux.sshdAn SSH server as a module: logging in with an Ed25519 key, starting it at boot from /etc/rc, and which algorithms it supports.The hypervisorA type-1 hypervisor written in Rust and shipped as a loadable module: AMD-V and Intel VT-x, Linux and Windows Server guests.The clusterOne list of a cluster's hosts, their keys and addresses, kept by every host through Raft: making a cluster, inviting a host, removing one.NBS: replicated block storageVolumes whose every chunk lives on three hosts: the metadata service on Raft, the chunk servers, snapshots, images and clones, and what happens when a host fails.vnet: networks across hostsPrivate networks a cluster's VMs share across its hosts: the state kept through Raft, the sealed tunnel between hosts, the cluster's firewalls, public addresses.

Tools

More