An open API service indexing awesome lists of open source software.

https://github.com/pedrior/os-algorithms


https://github.com/pedrior/os-algorithms

Last synced: over 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# OS Agorithms

This repository contains the source code for process scheduling and page replacement algorithms that i've learned in the Operating Systems course. This is purely for educational purposes.

## Process Scheduling Algorithms

The algorithms implemented are:

- First Come First Serve (FCFS)

- Shortest Job First (SJF)

- Round Robin (RR)

### Input

The input file should be a text file with the following format:

```text
0 20
0 10
4 6
4 8
```

Where the first column is the arrival time and the second column is the burst time.

## Page Replacement Algorithms

The algorithms implemented are:

- First In First Out (FIFO)

- Least Recently Used (LRU)

- Optimal (OPT)

### Input

The input file should be a text file with the following format:

```text
4
1
2
3
4
1
2
5
1
2
3
4
5
```

Where the first line is the number of frames and the rest of the lines are the page references.

## How to run

You'll need a C++ compiler that supports C++17 at least. Then, you can compile the source code normally and run it.