diff --git a/lab3/Makefile b/lab3/Makefile new file mode 100644 index 0000000..5b24bac --- /dev/null +++ b/lab3/Makefile @@ -0,0 +1,6 @@ +scheduler.out: scheduler.cpp + g++ scheduler.cpp -o scheduler.out + +run_sched: scheduler.out + ./scheduler.out $(WORKLOAD_FILE) $(SCHEDULING_ALGORITHM) + diff --git a/lab3/process1.dat b/lab3/process1.dat new file mode 100644 index 0000000..ee1996a --- /dev/null +++ b/lab3/process1.dat @@ -0,0 +1,11 @@ + +
++0 100 2 90 2 80 3 70 2 60 2 10 -1 +2 80 2 80 2 50 3 70 2 40 2 10 -1 +3 70 2 70 2 40 3 70 2 20 2 10 -1 +4 10 2 60 2 30 3 70 2 10 2 10 -1 +5 3 2 3 2 3 -1 +6 5 -1 +10 200 2 3 -1 +diff --git a/lab3/process2.dat b/lab3/process2.dat new file mode 100644 index 0000000..578ad3b --- /dev/null +++ b/lab3/process2.dat @@ -0,0 +1,22 @@ + + +
+0 5 -1 +1 3 2 3 2 3 -1 +6 10 2 60 2 30 3 70 2 10 2 10 -1 +23 3 2 3 2 3 -1 +24 70 2 70 2 40 3 70 2 20 2 10 -1 +25 3 2 3 2 3 -1 +26 80 2 80 2 50 3 70 2 40 2 10 -1 +27 3 2 3 2 3 -1 +28 25 2 10 -1 +29 3 2 3 2 3 -1 +31 3 2 3 2 3 -1 +33 3 2 3 2 3 -1 +35 3 2 3 2 3 -1 +40 3 2 3 2 3 -1 +40 3 2 3 2 3 -1 +42 3 2 3 2 3 -1 +43 3 2 3 2 3 -1 +45 3 2 3 2 3 -1 +diff --git a/lab3/process3.dat b/lab3/process3.dat new file mode 100644 index 0000000..0098fa1 --- /dev/null +++ b/lab3/process3.dat @@ -0,0 +1,16 @@ + + +
+0 15 2 5 2 15 2 5 2 15 2 5 2 15 2 5 2 15 2 5 2 15 2 5 2 15 2 5 2 15 2 5 2 5 2 15 2 5 2 5 -1 +2 100 2 180 2 10 -1 +5 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 -1 +8 50 6 100 2 10 -1 +12 15 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 2 5 -1 +20 80 2 80 2 201 2 15 -1 +30 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 -1 +35 6 -1 +36 8 50 2 -1 +37 100 -1 +38 5 2 2 -1 +40 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 2 15 -1 +diff --git a/lab3/scheduler.cpp b/lab3/scheduler.cpp new file mode 100644 index 0000000..c5e7271 --- /dev/null +++ b/lab3/scheduler.cpp @@ -0,0 +1,35 @@ +#include