xor-bits/hiillos
operating system and its own microkernel in pure Zig
7b29b6e6f6d35052f01ed3831085a39aae131705.tar.gzrefsef6a688fbeb294e36c9088286ebefc1b27d7ab71.tar.gzhiillos is an operating system with its own microkernel all written in pure Zig
The plan is for the kernel to be just a scheduler, an IPC relay, a physical memory manager and a virtual memory manager.
The system design steals borrows ideas from:
zig build run # thats it
# read 'Project-Specific Options' from `zig build --help` for more options
zig build run -Dtest=true # include custom unit test runner
# development cli
zig build run --prominent-compile-errors --summary none \
# one cpu makes debugging more consistent
-Dcpus=1 \
# run the GDB server silently, useful for debugging if the system freezes
-Dgdb=true \
# compile faster and with debug info
-Doptimize=Debug \
# compile root specifically with higher optimization to speed up initfs decompression
-Doptimize_root=ReleaseSafe \
# less initfs compression for faster builds
-Dzst_l=10
zig build # generates the os.iso in zig-out/os.iso
Approximate synchronous IPC performance: call + replyRecv
loop takes about 342ns (2 915 712 per second) (in QEMU+KVM with Ryzen 9 5950X):
// server
while (true) {
msg = try rx.replyRecv(msg);
}
// client
while (true) {
try tx.call(.{});
}