# 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).
