Question: Write a computer program to simulate Round Robin scheduling Round Robin Process Arrives - They have different arrival times. Generate task arrival with random arrival
Write a computer program to simulate Round Robin scheduling
Round Robin
Process Arrives
- They have different arrival times. Generate task arrival with random arrival times and random service time. Use the rand function to generate values.
Upon arrival, a process is appended at the end of the ready queue, top of the queue, or right after the current process which is in service at the time of arrival
Process Has:
ID
Service time
Arrival Time
-As time progresses, process will have
Start time, wait time, accumulated time, end time etc.
As time goes on, processes will be picked up by the dispatcher one at a time from the ready queue and will be allowed to execute for one quantum
o Quantum will be a variable, use quantum = 10
o Have a variable for context switch CS, use CS = 0. Your program should be able to use any value for CS.
Main program will call the various subprograms as needed
Main program should also have a variable to represent clock time
If a process completes before the time quantum has been finished, do not waste the time just doing nothing. Let another process execute following RR algorithm.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
