{"id":13471019,"url":"https://github.com/yhzhang0128/egos-2000","last_synced_at":"2025-05-14T08:06:03.785Z","repository":{"id":38262992,"uuid":"482953099","full_name":"yhzhang0128/egos-2000","owner":"yhzhang0128","description":"Envision a future where every student can read all the code of a teaching operating system.","archived":false,"fork":false,"pushed_at":"2025-04-08T02:09:10.000Z","size":26046,"stargazers_count":2260,"open_issues_count":0,"forks_count":163,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-04-11T02:51:51.557Z","etag":null,"topics":["education","operating-system"],"latest_commit_sha":null,"homepage":"https://egos.fun/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhzhang0128.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-18T18:25:26.000Z","updated_at":"2025-04-09T13:17:36.000Z","dependencies_parsed_at":"2023-10-12T06:45:54.647Z","dependency_job_id":"73021c61-1324-4615-9362-92d8abcc8f31","html_url":"https://github.com/yhzhang0128/egos-2000","commit_stats":{"total_commits":1107,"total_committers":4,"mean_commits":276.75,"dds":"0.012646793134598044","last_synced_commit":"671706ff9b3b19c8c4244e6491123e17f7462f6b"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhzhang0128%2Fegos-2000","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhzhang0128%2Fegos-2000/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhzhang0128%2Fegos-2000/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhzhang0128%2Fegos-2000/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhzhang0128","download_url":"https://codeload.github.com/yhzhang0128/egos-2000/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101615,"owners_count":22014909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["education","operating-system"],"created_at":"2024-07-31T16:00:38.501Z","updated_at":"2025-05-14T08:05:58.776Z","avatar_url":"https://github.com/yhzhang0128.png","language":"C","funding_links":[],"categories":["C","Operating Systems"],"sub_categories":[],"readme":"📢 [Feb 3, 2025] The first draft of the [EGOS book](https://egos.fun/book/overview.html) has been released which contains 9 course projects.\n\n## Vision\n\nThis project's vision is to help **every** student read **all** the code of a teaching operating system.\n\nWith only **2000** lines of code, egos-2000 implements every component of a teaching operating system that runs on both QEMU and RISC-V boards.\nThe [EGOS book](https://egos.fun/book/overview.html) further contains 9 course projects based on egos-2000.\n\n![Fail to load an image of egos-2000.](tools/screenshots/egos-2000.jpg)\n\n```shell\n# The cloc utility is used to count the lines of code.\n\u003e cloc egos-2000 --exclude-ext=md,txt,toml,json  # excluding text files\n...\ngithub.com/AlDanial/cloc v 1.94  T=0.05 s (949.3 files/s, 62349.4 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nC                               30            427            594           1594\nC/C++ Header                     9             66            106            256\nAssembly                         3             15             45             95\nmake                             1             16              8             55\n-------------------------------------------------------------------------------\nSUM:                            43            524            753           2000 (exactly!)\n-------------------------------------------------------------------------------\n```\n\n## Earth and Grass Operating System\n\nThe **egos** part of egos-2000 is named after its three-layer architecture.\n\n* The **earth layer** implements hardware-specific abstractions.\n    * tty and disk device interface\n    * timer and memory management interface\n* The **grass layer** implements hardware-independent abstractions.\n    * process control block and system call interface\n* The **application layer** implements file system, shell and user commands.\n\nThe definitions of `struct earth` and `struct grass` in header file [egos.h](library/egos.h) specify the layer interface.\nPlease read [USAGES.md](USAGES.md) for running egos-2000 and\nthe [instruction set manuals](https://github.com/riscv/riscv-isa-manual/releases) for the RISC-V privileged ISA.\n\n## Acknowledgements\n\nMany thanks to Meta for a [Facebook fellowship](https://research.facebook.com/blog/2021/4/announcing-the-recipients-of-the-2021-facebook-fellowship-awards/).\nMany thanks to [Robbert van Renesse](https://www.cs.cornell.edu/home/rvr/), [Lorenzo Alvisi](https://www.cs.cornell.edu/lorenzo/), [Shan Lu](https://people.cs.uchicago.edu/~shanlu/), [Hakim Weatherspoon](https://www.cs.cornell.edu/~hweather/) and [Christopher Batten](https://www.csl.cornell.edu/~cbatten/) for their support.\nMany thanks to [Cheng Tan](https://naizhengtan.github.io/) and [Yu-Ju Huang](https://yuju-huang.github.io/) for providing valuable feedback to the [EGOS book](https://egos.fun) and using egos-2000 in [Northeastern CS4973/6640](https://naizhengtan.github.io/25spring/) and [Cornell CS4411/5411](https://www.cs.cornell.edu/courses/cs4411/2025sp/).\nMany thanks to [Haobin Ni](https://haobin.cx/) and [Hongbo Zhang](https://www.cs.cornell.edu/~hongbo/) for [porting egos-2000 to mriscv](https://github.com/0x486F626F/mriscv/tree/egos), a simple processor written in SystemVerilog.\nMany thanks to [Brandon Fusi](https://www.linkedin.com/in/brandon-cheo-fusi-b94b1a171/) for [porting egos-2000 to Allwinner D1](https://github.com/cheofusi/egos-2000-d1) and Sipeed's [Lichee RV64 - Nezha compute module](https://wiki.sipeed.com/hardware/en/lichee/RV/RV.html).\n\nFor any questions, please contact [Yunhao Zhang](https://dolobyte.net/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhzhang0128%2Fegos-2000","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhzhang0128%2Fegos-2000","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhzhang0128%2Fegos-2000/lists"}