Operating System in 1,000 Lines – Intro
Hardware targets & RISC‑V details
- Several comments discuss whether the 32-bit RISC‑V OS can run on real hardware.
- Current mainstream RISC‑V SoCs with MMUs are mostly 64-bit; 32-bit RISC‑V with MMU is uncommon outside FPGA/embedded contexts.
- Porting from RV32 to RV64 (or vice versa) is seen as straightforward: main change is page-table layout (sv32 two-level vs sv39/sv48 multi-level).
- Allwinner D1 and Raspberry Pi / Pico boards are suggested as potential targets after some porting.
QEMU, virtio, and debugging
- Virtio is highlighted as a useful abstraction for virtual devices; it’s not QEMU‑only and is also used by other hypervisors.
- Some prefer QEMU for convenience, others mention using KVM directly for a leaner setup.
- Strong recommendations to wire up GDB early via QEMU’s built‑in GDB server.
- Additional QEMU features praised: record/replay, monitor commands for MMU/virtual memory debugging, and detailed logging flags. Reverse debugging is noted as currently unreliable.
- Multiarch GDB builds reduce the need for per‑architecture clients.
Alternative guides, languages, and OS designs
- Other educational OS resources are mentioned: a Rust OS tutorial, MIT’s RISC‑V xv6 course, JOS/x86 materials, and a Nim‑based kernel.
- One line of discussion argues there are already many hobby Unix‑like C kernels and calls for more experimentation: new languages (Rust, Zig, Hare, Ada, Nim, etc.) and non‑Unix designs (e.g., Plan 9–style).
- Others respond that writing “yet another Unix‑like in C” is still a valid and concrete learning goal, and that unusual designs only appear when someone is motivated to build them.
Feedback on the 1,000‑line OS book itself
- Many express enthusiasm: concise, approachable, good for undergrads and weekend projects.
- Typos and phrasing issues in the English text are noted; the author confirms partial machine translation and invites PRs.
- Readers request an ebook version; others show how to generate an EPUB from the Markdown and share a preliminary build.
- The OS is intentionally not Unix‑like and is presented as a conceptual “toy” that readers can adapt to other architectures or languages.