pedrior / os-algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

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:

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.

About

License:MIT License


Languages

Language:C++ 100.0%