Need help finishing the last bits of a C programming assignment.
project-2-master/.gitlab-ci.yml image: 115.146.92.24:5000/comp30023/p2:latest test: script: - /test.sh variables: GIT_STRATEGY: clone project-2-master/Makefile _: gcc -o scheduler scheduler.c -fsanitize=address project-2-master/scheduler.c int main() { return 0; } project-2-master/tests/cases/testcase1.in ./scheduler -f processes.txt -a ff -m u project-2-master/tests/cases/testcase1.out 0, RUNNING, id=4, remaining-time=30 30, FINISHED, id=4, proc-remaining=3 30, RUNNING, id=2, remaining-time=40 70, FINISHED, id=2, proc-remaining=2 70, RUNNING, id=1, remaining-time=20 90, FINISHED, id=1, proc-remaining=1 90, RUNNING, id=3, remaining-time=30 120, FINISHED, id=3, proc-remaining=0 Throughput 2, 1, 3 Turnaround time 71 Time overhead 4.25 2.56 Makespan 120 project-2-master/tests/cases/testcase10.in ./scheduler -f rr_memoryoverlap.txt -a rr -s 40 -m p -q 10 project-2-master/tests/cases/testcase10.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=50%, mem-addresses=[0,1,2,3,4] 20, RUNNING, id=2, remaining-time=40, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 40, EVICTED, mem-addresses=[0,1,2,3,4] 40, RUNNING, id=3, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 60, EVICTED, mem-addresses=[5,6,7,8,9] 60, RUNNING, id=4, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 80, EVICTED, mem-addresses=[0,1,2,3,4] 80, RUNNING, id=1, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 100, EVICTED, mem-addresses=[5,6,7,8,9] 100, RUNNING, id=2, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 120, EVICTED, mem-addresses=[0,1,2,3,4] 120, RUNNING, id=3, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 140, EVICTED, mem-addresses=[0,1,2,3,4] 140, FINISHED, id=3, proc-remaining=3 140, RUNNING, id=4, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 160, EVICTED, mem-addresses=[5,6,7,8,9] 160, RUNNING, id=1, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 180, EVICTED, mem-addresses=[5,6,7,8,9] 180, FINISHED, id=1, proc-remaining=2 180, RUNNING, id=2, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 200, RUNNING, id=4, remaining-time=10, load-time=0, mem-usage=100%, mem-addresses=[0,1,2,3,4] 210, EVICTED, mem-addresses=[0,1,2,3,4] 210, FINISHED, id=4, proc-remaining=1 210, RUNNING, id=2, remaining-time=10, load-time=0, mem-usage=50%, mem-addresses=[5,6,7,8,9] 220, EVICTED, mem-addresses=[5,6,7,8,9] 220, FINISHED, id=2, proc-remaining=0 Throughput 1, 0, 2 Turnaround time 181 Time overhead 6.75 6.13 Makespan 220 project-2-master/tests/cases/testcase11.in ./scheduler -f rr_memoryoverlap.txt -a rr -s 40 -m v -q 10 project-2-master/tests/cases/testcase11.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=50%, mem-addresses=[0,1,2,3,4] 20, RUNNING, id=2, remaining-time=40, load-time=10, mem-usage=100%, mem-addresses=[5,6,7,8,9] 40, EVICTED, mem-addresses=[0,1,2,3] 40, RUNNING, id=3, remaining-time=21, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,3] 58, EVICTED, mem-addresses=[4,5,6,7] 58, RUNNING, id=4, remaining-time=31, load-time=8, mem-usage=100%, mem-addresses=[4,5,6,7] 76, EVICTED, mem-addresses=[0,1,8,9] 76, RUNNING, id=1, remaining-time=21, load-time=8, mem-usage=100%, mem-addresses=[0,1,8,9] 94, EVICTED, mem-addresses=[2,3,4,5] 94, RUNNING, id=2, remaining-time=31, load-time=8, mem-usage=100%, mem-addresses=[2,3,4,5] 112, EVICTED, mem-addresses=[0,1,6,7] 112, RUNNING, id=3, remaining-time=12, load-time=8, mem-usage=100%, mem-addresses=[0,1,6,7] 130, EVICTED, mem-addresses=[2,3,8,9] 130, RUNNING, id=4, remaining-time=22, load-time=8, mem-usage=100%, mem-addresses=[2,3,8,9] 148, EVICTED, mem-addresses=[0,1,4,5] 148, RUNNING, id=1, remaining-time=12, load-time=8, mem-usage=100%, mem-addresses=[0,1,4,5] 166, EVICTED, mem-addresses=[2,3,6,7] 166, RUNNING, id=2, remaining-time=22, load-time=8, mem-usage=100%, mem-addresses=[2,3,6,7] 184, EVICTED, mem-addresses=[0,1,8,9] 184, RUNNING, id=3, remaining-time=3, load-time=8, mem-usage=100%, mem-addresses=[0,1,8,9] 195, EVICTED, mem-addresses=[0,1,8,9] 195, FINISHED, id=3, proc-remaining=3 195, RUNNING, id=4, remaining-time=13, load-time=8, mem-usage=100%, mem-addresses=[0,1,8,9] 213, EVICTED, mem-addresses=[2,3] 213, RUNNING, id=1, remaining-time=3, load-time=4, mem-usage=100%, mem-addresses=[2,3,4,5] 220, EVICTED, mem-addresses=[2,3,4,5] 220, FINISHED, id=1, proc-remaining=2 220, RUNNING, id=2, remaining-time=12, load-time=6, mem-usage=90%, mem-addresses=[2,3,4,6,7] 236, RUNNING, id=4, remaining-time=3, load-time=2, mem-usage=100%, mem-addresses=[0,1,5,8,9] 241, EVICTED, mem-addresses=[0,1,5,8,9] 241, FINISHED, id=4, proc-remaining=1 241, RUNNING, id=2, remaining-time=2, load-time=0, mem-usage=50%, mem-addresses=[2,3,4,6,7] 243, EVICTED, mem-addresses=[2,3,4,6,7] 243, FINISHED, id=2, proc-remaining=0 Throughput 1, 0, 2 Turnaround time 218 Time overhead 9.50 7.55 Makespan 243 project-2-master/tests/cases/testcase2.in ./scheduler -f processes.txt -a rr -m u -q 10 project-2-master/tests/cases/testcase2.out 0, RUNNING, id=4, remaining-time=30 10, RUNNING, id=2, remaining-time=40 20, RUNNING, id=1, remaining-time=20 30, RUNNING, id=4, remaining-time=20 40, RUNNING, id=3, remaining-time=30 50, RUNNING, id=2, remaining-time=30 60, RUNNING, id=1, remaining-time=10 70, FINISHED, id=1, proc-remaining=3 70, RUNNING, id=4, remaining-time=10 80, FINISHED, id=4, proc-remaining=2 80, RUNNING, id=3, remaining-time=20 90, RUNNING, id=2, remaining-time=20 100, RUNNING, id=3, remaining-time=10 110, FINISHED, id=3, proc-remaining=1 110, RUNNING, id=2, remaining-time=10 120, FINISHED, id=2, proc-remaining=0 Throughput 2, 0, 4 Turnaround time 88 Time overhead 3.25 2.96 Makespan 120 project-2-master/tests/cases/testcase3.in ./scheduler -f rr_memoryoverlap.txt -a ff -s 20 -m p project-2-master/tests/cases/testcase3.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 40, EVICTED, mem-addresses=[0,1,2,3,4] 40, FINISHED, id=1, proc-remaining=3 40, RUNNING, id=2, remaining-time=40, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 90, EVICTED, mem-addresses=[0,1,2,3,4] 90, FINISHED, id=2, proc-remaining=2 90, RUNNING, id=3, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 120, EVICTED, mem-addresses=[0,1,2,3,4] 120, FINISHED, id=3, proc-remaining=1 120, RUNNING, id=4, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 160, EVICTED, mem-addresses=[0,1,2,3,4] 160, FINISHED, id=4, proc-remaining=0 Throughput 2, 1, 2 Turnaround time 96 Time overhead 5.75 3.48 Makespan 160 project-2-master/tests/cases/testcase4.in ./scheduler -f rr_memoryoverlap.txt -a rr -s 20 -m p -q 10 project-2-master/tests/cases/testcase4.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 20, EVICTED, mem-addresses=[0,1,2,3,4] 20, RUNNING, id=2, remaining-time=40, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 40, EVICTED, mem-addresses=[0,1,2,3,4] 40, RUNNING, id=3, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 60, EVICTED, mem-addresses=[0,1,2,3,4] 60, RUNNING, id=4, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 80, EVICTED, mem-addresses=[0,1,2,3,4] 80, RUNNING, id=1, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 100, EVICTED, mem-addresses=[0,1,2,3,4] 100, RUNNING, id=2, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 120, EVICTED, mem-addresses=[0,1,2,3,4] 120, RUNNING, id=3, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 140, EVICTED, mem-addresses=[0,1,2,3,4] 140, FINISHED, id=3, proc-remaining=3 140, RUNNING, id=4, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 160, EVICTED, mem-addresses=[0,1,2,3,4] 160, RUNNING, id=1, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 180, EVICTED, mem-addresses=[0,1,2,3,4] 180, FINISHED, id=1, proc-remaining=2 180, RUNNING, id=2, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 200, EVICTED, mem-addresses=[0,1,2,3,4] 200, RUNNING, id=4, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 220, EVICTED, mem-addresses=[0,1,2,3,4] 220, FINISHED, id=4, proc-remaining=1 220, RUNNING, id=2, remaining-time=10, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 240, EVICTED, mem-addresses=[0,1,2,3,4] 240, FINISHED, id=2, proc-remaining=0 Throughput 1, 0, 2 Turnaround time 188 Time overhead 6.75 6.34 Makespan 240 project-2-master/tests/cases/testcase5.in ./scheduler -f rr_memoryoverlap.txt -a ff -s 20 -m p -q 10 project-2-master/tests/cases/testcase5.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 40, EVICTED, mem-addresses=[0,1,2,3,4] 40, FINISHED, id=1, proc-remaining=3 40, RUNNING, id=2, remaining-time=40, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 90, EVICTED, mem-addresses=[0,1,2,3,4] 90, FINISHED, id=2, proc-remaining=2 90, RUNNING, id=3, remaining-time=20, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 120, EVICTED, mem-addresses=[0,1,2,3,4] 120, FINISHED, id=3, proc-remaining=1 120, RUNNING, id=4, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 160, EVICTED, mem-addresses=[0,1,2,3,4] 160, FINISHED, id=4, proc-remaining=0 Throughput 2, 1, 2 Turnaround time 96 Time overhead 5.75 3.48 Makespan 160 project-2-master/tests/cases/testcase6.in ./scheduler -f rr_memoryoverlap.txt -a rr -s 20 -m v -q 10 project-2-master/tests/cases/testcase6.out 0, RUNNING, id=1, remaining-time=30, load-time=10, mem-usage=100%, mem-addresses=[0,1,2,3,4] 20, EVICTED, mem-addresses=[0,1,2,3] 20, RUNNING, id=2, remaining-time=41, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,3] 38, EVICTED, mem-addresses=[0,1,2,4] 38, RUNNING, id=3, remaining-time=21, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,4] 56, EVICTED, mem-addresses=[0,1,2,3] 56, RUNNING, id=4, remaining-time=31, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,3] 74, EVICTED, mem-addresses=[0,1,2,4] 74, RUNNING, id=1, remaining-time=21, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,4] 92, EVICTED, mem-addresses=[0,1,2,3] 92, RUNNING, id=2, remaining-time=32, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,3] 110, EVICTED, mem-addresses=[0,1,2,4] 110, RUNNING, id=3, remaining-time=12, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,4] 128, EVICTED, mem-addresses=[0,1,2,3] 128, RUNNING, id=4, remaining-time=22, load-time=8, mem-usage=100%, mem-addresses=[0,1,2,3] 146, EVICTED, mem-addresses=[0,1,2,4] 146, RUNNING, id=1, remaining-time=12, load-time=8, mem-usage=100%,