Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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) + "," + prio

Explanation / Answer

Modify the time-slicing CPU scheduling algorithm found here: https://www.dropbox

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote