killerswin2 / egos-2000-scheduler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vision

This project's vision is to help every college student read all the code of an operating system.

With only 2000 lines of code, egos-2000 implements every component of an operating system for education. It can run on a RISC-V board and also the QEMU software emulator.

Fail to load an image of egos-2000.

# The cloc utility is used to count the lines of code (LOC).
# The command below counts the LOC of everything excluding text documents.
> cloc egos-2000 --exclude-ext=md,txt
...
github.com/AlDanial/cloc v 1.94  T=0.05 s (949.3 files/s, 62349.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               37            510            665           1579
C/C++ Header                    10             68            105            285
Assembly                         4              6             31             72
make                             1             12              0             64
-------------------------------------------------------------------------------
SUM:                            52            596            801           2000 (exactly 2000!)
-------------------------------------------------------------------------------

Earth and Grass Operating System

egos-2000 was developed as a new teaching OS for CS5411/4411 at Cornell. It adopts a 3-layer architecture.

  • The earth layer implements hardware-specific abstractions.
    • tty and disk device interfaces
    • interrupt and memory management interfaces
  • The grass layer implements hardware-independent abstractions.
    • processes, system calls and inter-process communications
  • The application layer implements file system, shell and user commands.

The definitions of struct earth and struct grass in this header file specify the layer interfaces.

Usages and Documentation

For compiling and running egos-2000, please read this document. The RISC-V instruction set manual and SiFive FE310 manual introduce the privileged ISA and processor memory map. This document further introduces the teaching plans, architecture and development history.

Acknowledgements

Many thanks to Robbert van Renesse, Lorenzo Alvisi, Shan Lu and Hakim Weatherspoon for supporting this project. Many thanks to Meta for a Meta fellowship. Many thanks to all CS5411/4411 students at Cornell over the years for helping improve this course.

About

License:MIT License


Languages

Language:Python 39.3%Language:HTML 26.4%Language:C++ 18.2%Language:C 9.9%Language:Roff 4.2%Language:Shell 0.6%Language:M4 0.6%Language:Makefile 0.5%Language:Emacs Lisp 0.2%Language:Perl 0.1%Language:CSS 0.0%Language:PLSQL 0.0%Language:XC 0.0%Language:Objective-C 0.0%Language:Java 0.0%Language:Yacc 0.0%Language:C# 0.0%Language:Tcl 0.0%Language:Assembly 0.0%Language:DTrace 0.0%Language:Pascal 0.0%Language:Scheme 0.0%Language:PHP 0.0%Language:sed 0.0%Language:Awk 0.0%Language:Batchfile 0.0%Language:VBScript 0.0%