Minimal Time-Sharing OS Kernel on RISC-V in Zig
2025-09-14
This post details a minimal proof-of-concept time-sharing operating system kernel implemented on RISC-V using the Zig programming language. The project, a re-imagining of an undergraduate OS assignment, leverages modern tooling and the RISC-V architecture. It features statically defined threads, inter-thread system calls, and round-robin scheduling via timer interrupts. Basic thread virtualization is implemented, with each thread having a private stack and register context. The code is open-sourced, and the author provides a detailed walkthrough of the implementation and code explanations, making it a valuable resource for students of systems software and computer architecture.
Development