Thanks to visit codestin.com
Credit goes to github.com

Skip to content

raydatray/SimpleShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleShell

SimpleShell is an implementation of a shell originally done for McGill's COMP310/ECSE427 in W2024.

The original C version implements basic shell commands such as echo, set and:

  • The ability to run scripts consisting of shell commands concurrently
  • A basic scheduling system for when scripts are run concurrently (Round-Robin)
  • Demand paging with an LRU cache replacement policy
  • A file system with various utilities

Extended features in the Rust version include:

  • The ability to select which type of scheduling you wish to use
  • The ability to select which type of cache replacement you wish to use
  • The ability to "reconfigure" the memory sizes of the shell without recompilation
  • The ability to redefine page sizes and other shell parameters
  • And arguably better written/more understandable code with proper error handling thru Rust's Result type

The original assignment submissions are in a1/a2/a3 and were done in collaboration with Gordon

  • A1: tasked with implementing the following commands; set, echo, my_mkdir, my_touch, my_touch, my_cd, my_cat
  • A2: tasked with implementing a paging system, extending it with demand paging, and finally an LRU replacement policy
  • A3: tasked with implementing various file system utilities based on an write-behind and inode with indirect pointer architecture

The Rust rewrite is in SimpleShell is an exercise for myself and to become more familiar with the language's differences compared to C
I aim to:

  • Make use of the FP aspects of Rust
  • Actually make use of references by borrowing values and not spamming .clone() everywhere
  • Properly handle errors using Rust's result type
  • Write "idiomatic" Rust code

Version Log

  • V1.0: Feature parity reached with A2 of the original C version. See the commit here. Read the dev notes here

About

A simple shell implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published