MLambda.OS
An embedded operating system written in Aleph: a Minix-style microkernel on RISC-V, drivers in user space, and machines that join into one OS.
Research, boots to a shell on its own RISC-V machine
MLambda.OS
MLambda.OS is an embedded operating system written in freestanding Aleph and Hilbert. Its kernel follows Minix: it never handles a device itself. It keeps the hardware abstraction, memory, threads and the scheduler, IPC and the kernel calls, and every driver, the file system and the shell are user-space servers, each in its own address space. When a driver crashes, the reincarnation server starts it again and the system goes on.
What is built
| Part | What it is |
|---|---|
The machine (mos) |
A RISC-V emulator written in Aleph: RV64IMA with Zicsr, machine, supervisor and user modes, Sv39 and Sv48 paging, CLINT, PLIC, UART, virtio devices (disk, GPU, keyboard, tablet, network, random numbers), a real-time clock and SBI firmware. Its decode tables and machine facts are Shin rules. |
| The machine in a window | Its screen, serial console, power, reset and pause, drawn by Aphrodite on Sapphire |
| The kernel | The microkernel in supervisor mode, freestanding Aleph built for riscv64 |
| Drivers | Disk, terminal, GPU, input, network and clock, as user-space servers |
| Services | The file system (a VFS over MFS), processes, reincarnation, names, random numbers |
| Programs | A shell and /bin: ls, cat, ps, ping, get and more |
$ cat /etc/motd
Welcome to MLambda OS: a microkernel in Aleph, on RISC-V.
$ ps
0 blk priority 1 waiting
1 fs priority 2 waiting
2 gpu priority 1 waiting
$ service crash blk
Where it is going: one OS across machines
MLambda.OS is layered: hardware, kernel, drivers, a distributed kernel, over-the-air updates, and user apps. Above the drivers, machines join and work as one operating system, built on MLambda.Actors and MLambda.Data:
- user processes are actors, and run on any node; a node that cannot run an actor refuses it, and the actor model places it elsewhere, so mixed hardware does not matter;
- the system’s agreed state lives in MLambda.Data, not in files;
- an update is a new layer in a catalog, and machines follow it live: drivers and servers are updated in place and handed over, never by turning a machine off.
On MLambda.OS, GPU work goes through its own kernel. Hilbert.Tensor has a user-space door for it.