Syx · experimental operating system

A microkernel whose handlers never sleep.

In Syx a server's handler runs on its client's thread, so it never waits: it answers, or starts the work and answers at once, and the client waits outside the server. The kernel enforces it. On top of this model runs a POSIX environment with bash and GCC, in which GNU make builds itself.

Can a general-purpose operating system be a microkernel whose servers never block, with every wait moved out to the client, and still keep a useful POSIX environment?

experimental · not production-ready IA-32 · single CPU developed under QEMU in active development

GNU make builds itself inside Syx

The GNU make 4.4.1 source tarball is unpacked, configured and built with make -j4 inside Syx, by the Syx build of bash, GCC 15.3.0, binutils, coreutils, sed, gawk and grep. Every process that configure and make start is a POSIX process on the microkernel; every file read goes through a filesystem server whose handlers never sleep.

The VGA console of Syx under QEMU (TCG), captured through the QEMU monitor on 2026-10-08. configure and make -j4 are shown ten times faster, marked ×10 in the corner; nothing else is edited. 66 s, no sound.

About 322 s of guest time under QEMU TCG (ADR 0025). A functional test, not a performance claim. The make jobserver needs pselect with SIGCHLD in the mask (ADR 0024).

Handlers that never sleep

A server handler holds its client's thread and one of the server's few invoke stacks. So it must not wait for anything.

An invoke is a migrating-thread call: the calling thread itself switches into the server and runs the handler there, on one of the server's sixteen invoke stacks. A handler that sleeps keeps both. Other clients then wait for a stack or fail; the sleeping client cannot be interrupted until it leaves the server; and a wait that depends on another request to the same server is a deadlock.

Syx therefore moves every wait out of the servers:

  1. The client passes an OPERATION, a one-slot completion object, with a request that may have to wait.
  2. The handler answers at once: with the result, or after starting the work (a device read, a pipe read, a wait4).
  3. The client waits on the operation outside every server, at IPC level 0, holding no invoke stack and interruptible by signals.
  4. The server completes the operation later from its own threads: a watcher loop and a few workers.
A file read in two steps: a synchronous attempt that answers would-block after starting the fill, then an asynchronous request with an OPERATION that the server completes from its watcher when the device read ends. client (posixrt) fatfs handler fatfs watcher ide invoke: readat (synchronous form) start fill: async device read UERR_IO_WOULD_BLOCK invoke: readat_vmo_async(vmo, op) accepted, joins the fill waits on op at ipc_level 0 (kcall 110) device read done supply pages to the file's VMO; copy data into the client's VMO complete op (kcall 92) client reads the result (kcall 93)
A file read that misses the cache (ADR 0025). The handler starts the fill and answers; the client waits at IPC level 0. Requests that do not need the device are served in the first step.
Kernel rule (ADR 0027)

A thread running a handler on behalf of another process gets KERR_INVOKE_WAIT_IN_HANDLER at once, without sleeping, from a sleep, a wait on an object, or a wait with a deadline. A server's own threads may wait: they hold no client.

The rule was reached service by service: pipes and wait4, the terminal, then the filesystem, measured with a kernel inventory of every wait made inside a handler, and only then enforced. Once no handler sleeps, a client waiting for a free invoke stack cannot deadlock, so it now waits in FIFO order instead of failing (ADR 0028).

The rest of the kernel interface

IPC

Invoke: the caller's thread runs the server

A synchronous, migrating-thread call. No server thread is woken, nothing is queued in the kernel. Nesting is bounded by the thread's kernel stack.

Memory

VMOs and user-space pagers

A missing page is requested from a pager in the server that backs the VMO. The pager may answer PAGER_PENDING, release its stack, and supply the page later; concurrent faults join one request.

Personality

POSIX as an emulation layer

Syx is not Linux; it emulates the Linux i386 syscall ABI for programs linked with musl. posixrt runs inside each POSIX process and talks to the servers over invoke.

System structure

Everything above the kernel is a process. Drivers take I/O ports and IRQs through kernel objects and export an interface like any other server. Arrows are invokes; the dashed arrow is a page fault served by a pager.

Syx system structure: POSIX processes with musl and posixrt invoke user-space servers and filesystem servers, which invoke drivers; all run on the kernel. USER SPACE POSIX process program bash, gcc, make, coreutils musl libc 1.2.0 __syscallN -> posixrt posixrt Linux i386 syscall layer fds, positions, signals, fork/exec, poll/select Services svc/posix pids, pipes, wait4 svc/term console terminal svc/time civil time svc/system object registry Filesystem servers (fscore) fatfs FAT, read-only, pager ramfs writable, /tmp bifs boot image Drivers ide (PIO) · ps/2 keyboard · VGA text display · rtc KERNEL Kernel IA-32, one CPU, IF=0 in the kernel, no kernel preemption handles + rights · invoke · VMO, pager · watcher, signals · OPERATION · TIMER · CELL · IRQ invoke page fault -> pager invoke
Main components. Each box above the kernel is a separate process. Names are the directories of the source tree.

A POSIX environment that builds software

Real programs, cross-compiled against musl with small Syx patches: bash 5.3, GCC 15.3.0 and binutils 2.47, GNU make 4.4.1, coreutils, grep, sed, gawk, diffutils, findutils, tar and gzip.

Processes

fork, execve, wait4, process groups and sessions, pipes, POSIX signals including faults delivered as SIGSEGV/SIGBUS.

I/O

select, pselect, poll, ppoll on pipes and the terminal; interruptible waits with deadlines; alarm and interval timers.

Files

FAT (read-only) and a writable RAM filesystem; executables mapped from file VMOs and paged in on demand; asynchronous reads and page-ins in the filesystem servers.

Terminal

Virtual terminals on the VGA text console, served by a terminal server: a minimal line discipline with canonical mode, termios ioctls, interactive bash with readline.

Time

A monotonic clock in the kernel; civil time in a user-space time service backed by an RTC driver.

Measurement

A built-in profiler: tick samples, kernel time, invoke time per server and per-syscall counters in posixrt.

How it is developed

Interface changes are written down as decision records before any code, and every regular run of the test suites boots Syx headless under QEMU. How that works, and why, is on the Why Syx? page.