https://github.com/pedrior/os-algorithms
https://github.com/pedrior/os-algorithms
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/pedrior/os-algorithms
- Owner: pedrior
- License: mit
- Archived: true
- Created: 2023-03-11T21:05:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-11T21:22:08.000Z (over 3 years ago)
- Last Synced: 2025-02-28T22:21:00.260Z (over 1 year ago)
- Language: C++
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.