Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Scheduling Algorithms

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.

Compile

g++ src/main.cpp -o bin/main

Run Specific Input (Default)

Ensure 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.

Run All Test Cases

Change lines 432 and 433 to the following:

return !testAlgorithms(16);
// return generateOutput();

Then run the following command after compiling

bin/main

Will display output to the terminal.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages