Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: You are required to implement Round Robin Scheduling Algorithm in Python. Implement the functions for the following: findWaitingTime() findTurnAroundTime() findavgTime() averageWaitingTime() averageTurnAroundTime() Step

Question 1:

You are required to implement Round Robin Scheduling Algorithm in Python.

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions