Question: Can you fix the errors? It is not an indentation error . When I try to run python3 batchSchedulingComparison.py batchfile.txt ShortestRemaining or python3 batchSchedulingComparison.py batchfile.txt
Can you fix the errors? It is not an indentation error.
When I try to run
python3 batchSchedulingComparison.py batchfile.txt ShortestRemaining
or
python3 batchSchedulingComparison.py batchfile.txt RoundRobin
its isn't working



![(batchFileData): queue =[] current_time =0 waiting_times ={} completion_times ={} time_quantum =10 for](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3d1c118ce7_97766f3d1c113918.jpg)
This is the error I am getting.
![process in batchFileData: waiting_times [ process [0]]=0 completion_times [process [0]]=0 while len(batchFileData)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3d1c1bc438_97766f3d1c1592b0.jpg)
RoundRobinSort (batchFileData): queue =[] current_time =0 waiting_times ={} completion_times ={} time_quantum =10 for process in batchFileData: waiting_times [ process [0]]=0 completion_times [process [0]]=0 while len(batchFileData) >0 or len(queue) >0 : for process in batchFileData: if process [1] >0 : process = queue. pop (0) if process [2] > time_quantum: current_time += time_quantum process [2] -= time_quantum queue. append (process) else: current_time += process [2] process [2] =0 completion_times [ process [0]]= current_time waiting_times [process [0]] = current_time - process [1] else: current_time +=1 return waiting_times, completion_times File "/Users/taniajaswal/Downloads/cs446_schedulingandmemory-Jaswal-Tania/batchSchedulingComparison.py", line 87, in main() File "/Users/taniajaswal/Downloads/cs446_schedulingandmemory-Jaswal-Tania/batchSchedulingComparison.py", line 51, in main order, completion = RoundRobinSort(array) ameError: name 'RoundRobinSort' is not defined
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
