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
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