MCPcopy Index your code
hub / github.com/RWTH-OS/eduOS-rs

github.com/RWTH-OS/eduOS-rs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
368 symbols 713 edges 47 files 102 documented · 28%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Actions Status

eduOS-rs - A teaching operating system written in Rust

Introduction

eduOS-rs is a Unix-like operating system based on a monolithic architecture for educational purposes. It is developed for the course Operating Systems at RWTH Aachen University. eduOS-rs is derived from following tutorials and software distributions:

  1. Philipp Oppermann's excellent series of blog posts.
  2. Erik Kidd's toyos-rs, which is an extension of Philipp Opermann's kernel.
  3. The original version of eduOS, which was the old teaching kernel written in C.
  4. eduOS-rs' uses a memory allocator, which is derived from the buddy_system_allocator.
  5. The first version of paging is derived from a version, which was developed by Colin Finck.

Requirements to build eduOS-rs

eduOS-rs is tested under Linux, macOS, and Windows.

macOS

Apple's Command Line Tools must be installed. The Command Line Tool package gives macOS terminal users many commonly used tools and compilers, that are usually found in default Linux installations. Following terminal command installs these tools without Apple's IDE Xcode:

$ xcode-select --install

In addition, Qemu must be installed. Please use Homebrew as package manager to install Qemu.

$ brew install qemu 

Windows

To build eduOS-rs you have to install Qemu and a git client. Please use Chocolatey as package manager to install Qemu and git.

$ choco install qemu git

Linux

Linux users should install common developer tools. For instance, on Ubuntu 22.04 the following command installs the required tools:

$ apt-get install -y git qemu-system-x86 build-essential

Common for macOS, Windows and Linux

This project uses Rustup to set its Rust toolchain. Follow the instructions to install Rust using Rustup.

In addition, the tool bootimage is required, which creates a bootable diskimage. Please install the tool with following command.

$ cargo install bootimage

Building

eduOS-rs is able to run within Qemu, which is a generic and open source machine emulator and virtualizer.

After cloning the repository, you can run the kernel with following command:

$ cargo run

Overview of all branches

Step by step (here branch by branch) the operating system design will be introduced. This tutorial shows the steps to develop from a minimal kernel to a Unix-like computer operating system. Currently, following stages of development are available:

  1. stage0 - Smallest HelloWorld of the World

Description of loading a minimal 64bit kernel

  1. stage1 - Cooperative/non-preemptive multitasking

Introduction into a simple form of multitasking, where no interrupts are required.

  1. stage2 - Priority-based cooperative/non-preemptive multitasking

Introduction into a simple form of priority-based multitasking, where no interrupts are required.

  1. stage3 - Synchronization primitives

Introduce basic synchronization primitives

  1. stage 4 - Preemptive multitasking

Introduction into preemptive multitasking and interrupt handling

  1. stage 5 - Support of user-level tasks

Add support of user-level tasks with an small interface for basic system calls

  1. stage 6 - Support of paging

Add support of paging and a simple demo for process creation

  1. stage 7 - Basic IO interface

Add basic support of file descriptors

  1. stage 8 - Integration of an in-memory file system

Introduce a virtual file system with an in-memory file system as example file system.

  1. stage9 - Run Linux application as common process

Start a simple Linux application (HelloWorld) on top of eduOS-rs. The application is a position-independent executable (PIE) and use musl-libc as standard C library. The FPU support is disabled.

Useful Links

  1. http://www.gnu.org/software/grub/manual/multiboot/
  2. http://www.osdever.net/tutorials/view/brans-kernel-development-tutorial
  3. https://www.acs.eonerc.rwth-aachen.de/cms/e-on-erc-acs/studium/lehrveranstaltungen/~xwyom/grundgebiete-der-informatik-4-betriebs/?lidx=1
  4. http://rwth-os.github.io/eduOS/
  5. https://intermezzos.github.io

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Extension points exported contracts — how you extend this code

Write (Interface)
The Write trait allows for reading bytes from a source. The Write trait is derived from Rust's std library. [6 implementers]
src/io.rs
PageTableLevel (Interface)
An interface to allow for a generic implementation of struct PageTable for all 4 page tables. Must be implemented by all [4 …
src/arch/x86/mm/paging.rs
IoInterface (Interface)
(no doc) [4 implementers]
src/fd/mod.rs
VfsNode (Interface)
VfsNode represents an internal node of the virtual file system. [2 implementers]
src/fs/mod.rs
Stack (Interface)
(no doc) [2 implementers]
src/scheduler/task.rs
Read (Interface)
The Read trait allows for reading bytes from a source. The Read trait is derived from Rust's std library. [1 implementers]
src/io.rs
PageSize (Interface)
A generic interface to support all possible page sizes. This is defined as a subtrait of Copy to enable #[derive(Clone, [3 …
src/arch/x86/mm/paging.rs
VfsNodeFile (Interface)
VfsNodeFile represents a file node of the virtual file system. [1 implementers]
src/fs/mod.rs

Core symbols most depended-on inside this repo

send_eoi_to_master
called by 23
src/arch/x86/kernel/irq.rs
len
called by 23
src/fs/initrd.rs
lock
called by 22
src/synch/mutex.rs
abort
called by 21
src/scheduler/mod.rs
clone
called by 14
src/fs/initrd.rs
len
called by 12
src/fs/mod.rs
is_empty
called by 10
src/mm/linked_list.rs
irqsave
called by 9
src/collections/mod.rs

Shape

Method 159
Function 129
Class 50
Enum 17
Interface 13

Languages

Rust100%
C1%

Modules by API surface

src/arch/x86/mm/paging.rs49 symbols
src/arch/x86/kernel/irq.rs41 symbols
src/scheduler/task.rs23 symbols
src/fs/vfs.rs23 symbols
src/scheduler/scheduler.rs18 symbols
src/scheduler/mod.rs18 symbols
src/fs/mod.rs18 symbols
src/mm/linked_list.rs13 symbols
src/arch/x86/mm/mod.rs11 symbols
src/arch/x86/kernel/mod.rs11 symbols
src/synch/mutex.rs10 symbols
src/fs/initrd.rs10 symbols

For agents

$ claude mcp add eduOS-rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact