-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
39 lines (29 loc) · 1.08 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import sys
import pandas as pd
sys.path.append(os.path.relpath("First-Come-First-Serve-scheduling"))
sys.path.append(os.path.relpath("Priority-Scheduling"))
sys.path.append(os.path.relpath("Round-Robin-scheduling"))
sys.path.append(os.path.relpath("Shortest-Job-First-scheduling"))
from FCFS import simulate_fcfs_algorithm
from SJF_np import simulate_sjf_np_algorithm
from SJF_p import simulate_sjf_p_algorithm
from RR import simulate_rr_algorithm
from priority_p import simulate_priority_p_algorithm
from priority_np import simulate_priority_np_algorithm
if __name__ == "__main__":
# read data
data = pd.read_csv("db/data_set.csv")
# fcfs algorithm
simulate_fcfs_algorithm(data)
# sjf non preemptive algorithm
simulate_sjf_np_algorithm(data)
# sjf preemptive algorithm
simulate_sjf_p_algorithm(data)
# round robin preemptive algorithm
quantum = 1
simulate_rr_algorithm(data, quantum)
# priority non preemptive algorithm
simulate_priority_np_algorithm(data)
# priority preemptive algorithm
simulate_priority_p_algorithm(data)