CPU Scheduling Algorithms Simulation:
FCFS (first-come, first-serve) \SJF (shortest job first) \SRTF (shortest remaining time first) \RR (round-robin)\
BALCUEVA, Joshua C.
LA'O, Erin Denise C.
SY, Matthew Jericho G.
-
Launch command prompt (cmd) in the folder containing "main.py"
-
Run code with test_case file using input redirection:
a.python main.py < "testcase.txt"
-
Optionally, you can run "test_script.sh" using "Git Bash" to test the code using the test cases provided.
a. Right click the folder with "test_script.sh", then click the option "Open Git Bash here".
b. A Git Bash command prompt should appear, type./test_script.sh
to run test cases.
c. Choose the number of the CPU Scheduling Algorithm you want to test and enter.
In the case that the error "python3: command not found" appears. Edit line 46 of "test_script.sh".
Edit "python3" -> "python"It should look like this
DIFF_OUTPUT=$(diff --strip-trailing-cr <(python main.py < $input_file) $output_file)
Run test_script.sh again, and it should work.