add: project 2

This commit is contained in:
Kiana Sheibani 2025-10-28 22:15:17 -04:00
parent 2b3c28d249
commit 4e8e564b44
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
25 changed files with 921 additions and 3 deletions

36
project2/README.md Normal file
View file

@ -0,0 +1,36 @@
# CS3502 Project 2: CPU Scheduling Simulation
This directory contains a simulator for various CPU scheduling algorithms.
## Compilation
If you have [Nix](https://nixos.org/) installed:
```sh
nix run .#cpu-schedulers
```
Otherwise, the code may be compiled using GNU Make:
``` sh
make
./build/cpu-schedulers
```
## Usage
This program supports seven scheduling algorithms:
- `sjf` - Shortest Job First
- `fcfs` - First Come First Serve
- `roundrobin` - Round Robin
- `priority` - Priority Queue
- `priorityaging` - Priority Queue with Aging
- `lottery` - Lottery
- `srtf` - Shortest Remaining Time First
The `compare` option can also be entered to run all schedulers at once.
Test data must be entered by the user; all time values must be given in
integers. Flags include `-v` for verbose debug output, and `-m` for
machine-readable output (prints data in CSV format).