Question: Can i please get help with fixing the code below RoundRobin Scheduling Question : Write a computer program simulating RR scheduling for the 5 processes

Can i please get help with fixing the code below

RoundRobin Scheduling

Question : Write a computer program simulating RR scheduling for the 5 processes with arrival and service times as shown in the table. Your program will show the progress of each process and calculate start time, end time, initial wait time, total wait time of each process. Quantum =10, context switch =0.

Programming Language is Java.

id Service time Arrival time
1 75 0
2 40 10
3 25 10
4 20 80
5 45 85

Code for the program but not able to run please fix the error.

/Program to implement Round Robin

import java.util.*; import java.util.concurrent.CompletableFuture;

@SuppressWarnings("unused") public class RoundRobin {

public static void findWaitingTime(int processes[],int wt_time[],int n, int bursttime[],int quantum, int completion_time[],int arrival_time[]) // copy the value of bursttime array into wt_time array { int rem_time[]=new int[n]; for(int i=0;i0) { done=false; if(rem_time[i]>quantum&&arrival_time[i]<=arrival) { t+=quantum; rem_time[i]-=quantum; arrival++; } else { if(arrival_time[i]<=arrival) { arrival++; t+=rem_time[i]; rem_time[i]=0; completion_time[i]=t; } } } } if(done==true) { break; } } } public static void findTurnAroundTime(int processes[],int wt_time[],int n,int bursttime[], int tat_time[],int completion_time[],int arrival_time[]) { for(int i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!