Practicing OS fundamentals by re-creating the following CPU scheduling algorithms:
- Round Robin
- Shortest Job First
- Priority Scheduling (No Preemption)
- Priority Scheduling (Preemption)
Code will output the algorithm used, waiting time for all processes, and the overall average waiting time.
g++ src/main.cpp -o bin/mainEnsure lines 432 and 433 are the following:
// return !testAlgorithms(16);
return generateOutput();Then run the following command after compiling
bin/main <input_file.txt>Will write the output to an output.txt file.
Change lines 432 and 433 to the following:
return !testAlgorithms(16);
// return generateOutput();Then run the following command after compiling
bin/mainWill display output to the terminal.