/rust-os-cs140e

An Experimental Course on Operating Systems

rust-os-cs140e

An Experimental Course on Operating Systems

Assignments from the CS140 course.

Directory Structure

+-- blinky  
|   +-- phase3  
|   +-- phase4  
+-- shelly  
|   +-- ferris-wheel  
|   +-- questions  
|   +-- stack-vec  
|   +-- ttywrite  
|   +-- volatile  
|   +-- xmodem  
+-- osy  
    +-- bootloader  
    +-- files  
    +-- kernel  
    +-- pi  
    +-- std  
    +-- volatile  

Rust Versioning

$ rustup install nightly-2018-01-09
$ rustup default nightly-2018-01-09
$ rustup override set nightly-2018-01-09
$ rustup component add rust-src

$ cargo install xargo --version 0.3.10

$ rustc --version
rustc 1.25.0-nightly (b5392f545 2018-01-08)

$ xargo --version
xargo 0.3.10
cargo 0.25.0-nightly (a88fbace4 2017-12-29)

blinky

Phase 0 - 4 from Assignment 0: Blinky. Get the enviornment setup and make and LED blink in C and Rust.

Phase 0: Getting Started

  • Getting your Pi Ready
  • Getting the Skeleton Code

Phase 1: Baking Pi

  • Installing Driver
  • Powering the Pi
  • Running Programs

Phase 2: LED There Be Light

  • GPIO: General Purpose I/O
  • Testing the LED

Phase 3: Shining C

  • Installing a Cross-Compiler
  • Talking to Hardware
  • GPIO Memory-Mapped Interface
  • Writing the Code

Phase 4: Rusing Away

  • Installing Rust and Xargo
  • Writing the Code

shelly

Phase 0 - 2 from Assignment 1: Shell. Write stack-vec, volatile, ttywrite, and xmodem libraries.

Phase 0: Getting Started

  • Getting the Skeleton Code
  • Questions

Phase 1: Ferris Wheel

  • Diff Budget
  • The Rules
  • Modify Away!

Phase 2: Oxidation

  • Subphase A: StackVec
  • Subphase B: volatile
  • Subphase C: xmodem
  • Subphase D: ttywrite

osy

Phase 3 and 4 from Assignment 1: Shell and Phase 0, 1, 3, and 4 from Assignment 2.

The assignment-1 branch contains the completed code for first assignment, and the assignment-2 branch contains the completed code for second assignment.

Assignment 1: Shell

Phase 3: Not a Seashell

  • Subphase A: Getting Started
  • Subphase B: System Timer
  • Subphase C: GPIO
  • Subphase D: UART
  • Subphase E: The Shell

Phase 4: Boot 'em Up

  • Loading Binaries
  • Making Space
  • Implementing the Bootloader

Assignment 2: File System

Phase 0: Getting Started

  • Getting the Skeleton Code
  • Firmware Update
  • Installing ttywrite

Phase 1: Memory Lane

  • Subphase A: Panic!
  • Subphase B: ATAGS
  • Subphase C: Warming Up
  • Subphase D: Bump Allocator
  • Subphase E: Bin Allocator

Phase 3: Saddle Up

  • Subphase A: SD Driver FFI
  • Subphase B: File System

Phase 4: Mo'sh

  • Working Directory
  • Commands
  • Implementation

filey

Phase 2 from Assignment 2: File System.

Assignment 2: File System

Phase 2: 32-bit Lipids

  • Disks and File Systems
  • Disk Layout
  • Code Structure
  • Implementation