Question: Question 1: You are required to implement Round Robin Scheduling Algorithm in Python. Take inputs from user. Implement the functions for the following: findWaitingTime() findTurnAroundTime()
Question 1:
You are required to implement Round Robin Scheduling Algorithm in Python. Take inputs from user.
Implement the functions for the following:
findWaitingTime()
findTurnAroundTime()
findavgTime()
averageWaitingTime()
averageTurnAroundTime()
Step to findWaitingTime()
Create an array rem_burstTime[] to keep track of the remaining burst time of processes. This array is initially a copy of burstTime[] (burst times array)
Create another array waitingTime[] to store waiting times of processes. Initialize this array as 0.
Initialize time: time = 0
Keep traversing all the processes while they are not done. Do the following for ith process if it is not done yet.
If rem_burstTime[i] > quantum
time = time + quantum
rem_burstTime[i] -= quantum;
Else // Last cycle for this process
time = time + rem_burstTime[i];
waitingTime[i] = time burstTime[i]
rem_busrtTime[i] = 0; // This process is over
Kindly post whole code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
