Modify the time-slicing CPU scheduling algorithm found here: https://www.dropbox
ID: 3546380 • Letter: M
Question
Modify the time-slicing CPU scheduling algorithm found
here:
https://www.dropbox.com/s/nqvgm69wl6hpieu/timeslicing.py
to implement priority-based scheduling.
Assume that there are two priority levels in the operating system HIGH and LOW. In the data following data file:
https://www.dropbox.com/s/qu1z4tv49xzq4lx/timeslicing.txt
each process has associated with it a priority specified by H for high, and L for low. Write the program so that high priority processes get two times the time slice and low priority processes get only one time slice. The pseudocode would look something like this:
This will require that you split the input into three values instead of two:
PID, exectime, prio = proc.split(,)
and if the process has to be put back in the queue, you have to concatenate the PID, the execution time and the priority into the string that is put into the queue.
proc = PID + , + str(exectime) + , + prio
Modify the time-slicing CPU scheduling algorithm found here: to implement priority-based scheduling. Assume that there are two priority levels in the operating system HIGH and LOW. In the data following data file: each process has associated with it a priority specified by 'H' for high, and 'L' for low. Write the program so that high priority processes get two Times the time slice and low priority processes get only one time slice. The pseudocode would look something like this: This will require that you split the input into three values instead of two: PID, exectime, prio = proc.split(",") and if the process has to be put back in the queue, you have to concatenate the PID, the execution time and the priority into the string that is put into the queue. proc = PID + "," + str(exectime) + "," + prioExplanation / Answer
Modify the time-slicing CPU scheduling algorithm found here: https://www.dropbox
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.