Question: Hello, I need help writing a short JAVA program that can implement Round Robin processing , and also provide avg. turnaround time and avg response

Hello, I need help writing a short JAVA program that can implement Round Robin processing, and also provide avg. turnaround time and avg response time. Below I have typed up the criteria/hints for the type of program I am looking for. Suppose for testing, the processes are A:(0,20), B:(0,10), C:(0,40), D:(0,20). I was hoping to have it in this format of a Process class and Scheduler class, so two separate classes.

What I know so far is that an array and a for-loop need to be implemented. Each process must make progress towards completion. The processes should get scheduled one after an other, typical to round robin. Once a process is complete, it should no longer be considered into the scheduling process. After the processes are all finished, the program should end and have a print statement with the following info: total time, avg. turnaround time and avg. response time. Your help/time will be greatly appreciated!! Comments would also be helpful!!

Hello, I need help writing a short JAVA program that can implement

To implement the problem we need a representation for each process, the scheduler logic, and the calculation logic for response time and turnaround time. Devise a class for Process that holds the data needed to describe a process and to allow calculating the required times: public class Process // variables for duration, time of arrival, // constructor // methods: which ones are helpful? We also need a representation of the scheduler: public class Scheduler // the 5 processes according to the 'analysis' document private Processll procs new Process(new Process(0, 10), new Process(o, 20),h // constructor, methods, etc. // main to pull it together

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!