A full-featured system emulator and virtual machine host for iOS, macOS and visionOS, built on QEMU to run Windows, Linux and other systems.
yhzhang0128/egos-2000
A teaching operating system with about 2,000 lines of C and RISC-V assembly, designed so students can read all of its code.
- Stars
- 3,694
- Forks
- 320
- Open issues
- 0
- Last commit
- 2 months ago
What is it?
egos-2000 is a teaching operating system written in C and RISC-V assembly, with the whole codebase kept to about 2,000 lines. Its goal is to let a student read every line of a working OS, covering device interfaces, memory management, timers, processes, system calls, a file system, and a shell.
The system is organized into three layers. The earth layer abstracts hardware such as the tty, disk, timer, and memory, the grass layer provides hardware-independent process control and system call interfaces, and the application layer contains the file system, shell, and user commands. The layer interfaces are defined as `struct earth` and `struct grass` in the header egos.h.
It runs on both the QEMU emulator and RISC-V boards. The project is paired with the EGOS book, which contains nine course projects built on the codebase.
Key features
- 01Implements the core components of an OS in about 2,000 lines of code
- 02Runs on the QEMU emulator and RISC-V boards
- 03Three-layer design separates hardware, process/syscall, and application code
- 04Includes a file system, shell, and user commands
- 05Accompanied by the EGOS book with nine course projects
Use cases
- Learning how an operating system works from the hardware interface up
- Teaching an OS course where students read and extend a complete small kernel
- Porting an OS to a new RISC-V board or processor implementation
Quick start
- 1
Read USAGES.md for instructions on running egos-2000
Things to know
- The license is not identified in the metadata, so reuse terms are unclear.
- It runs only on QEMU and RISC-V boards, not on other hardware.
- It is a teaching OS with about 2,000 lines of code, not a production operating system.
Topics
FAQ
- What is egos-2000?
- A teaching operating system with about 2,000 lines of C and RISC-V assembly, designed so students can read all of its code. egos-2000 is a teaching operating system written in C and RISC-V assembly, with the whole codebase kept to about 2,000 lines. Its goal is to let a student read every line of a working OS, covering device interfaces, memory management, timers, processes, system calls, a file system, and a shell.
- Is egos-2000 free to use? What license does it have?
- egos-2000 is open source under the Other license. Check the license terms before using it in commercial products.
- Is egos-2000 still maintained?
- Updated within 6 months. The last commit to egos-2000 was on Aug 16, 2026.
- What can I use egos-2000 for?
- Learning how an operating system works from the hardware interface up Teaching an OS course where students read and extend a complete small kernel Porting an OS to a new RISC-V board or processor implementation
- How do I install egos-2000?
- Read USAGES.md for instructions on running egos-2000
- Where can I get egos-2000?
- The source code and installation instructions are on GitHub: https://github.com/yhzhang0128/egos-2000
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A 12-week, 26-lesson beginner curriculum on classic machine learning using Scikit-learn, with Python and R lessons and quizzes.
A curated list of university-level computer science courses that include video lectures, organized by topic.
An open-source book and code collection of modern CUDA learning notes, with 200+ kernels covering HGEMM, FP8/FP4 GEMM, and Flash-Attention.
A Flutter app for English listening and speaking practice that automates intensive listening, shadowing, blind listening, retelling and spaced review.
A collection of 54 single-file, dependency-free Python scripts that implement modern AI algorithms from scratch so their internals are readable.