Yunhao Zhang's egos-2000 Educational Operating System Now Boasts a Nine-Lesson Comp Sci Book

The EGOS book delivers six lessons targeting undergraduates and three for "master-level" would-be OS engineers.

Gareth Halfacree
3 months agoProductivity

Software engineer Yunhao Zhang has informed us of a major milestone for the egos-2000 project, which teaches core concepts through a custom-built operating system written in just 2,000 lines of code: the release of the supporting EGOS book.

"Recently, my friends and I have finished the first draft of the EGOS book and put it free online," Zhang tells us via email. "This book contains nine course projects based on egos-2000 and, after doing the hands-on projects, students will finish reading all the code of egos-2000. My friends are currently using this book to teach CS4411 at Cornell and CS6640 at Northeastern."

We first looked at egos-2000, the "Earth and Grass Operating System," back in May 2023. "This project's vision is to help every college student read all the code of an operating system," Zhang explained at the time. "With only 2,000 lines of code, egos-2000 implements every component of an operating system for education."

Designed for use with RISC-V devices, FPGA cores, or an emulator such as QEMU, egos-2000 is based on the earlier egos-classic — both developed for student use at Cornell University. With exactly 2,000 lines of code, egos-2000 is small enough that it can be easily read through and understood — particularly now Zhang and friends have released the EGOS book.

The online book covers nine lessons that walk through the operating system bit-by-bit: the de rigueur "hello, world" lesson; cooperative threads; preemptive scheduler; system call and protection; virtual memory; serial device driver; file system; Ethernet and TCP/IP connectivity; and multicore and locks. The first six are described as "core projects," which target the knowledge required for an undergraduate-level course like Cornell's CS4411; the remaining three target a "master-level OS course" like Cornell's CS5411.

The EGOS book is now available to read in full on egos.fun, while the egos-2000 source code is available on GitHub under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles