Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
This is the error I am getting.
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 definedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started