Question: ##### PROJECT NEEDED IN JAVA ##### In this project, we are going to simulate Round-Robin Scheduling Algorithm Developing tools: NetBeans in Windows. General Description: Assume

##### PROJECT NEEDED IN JAVA #####

In this project, we are going to simulate Round-Robin Scheduling Algorithm

Developing tools:

NetBeans in Windows.

General Description:

Assume we have 10 processes that need to be run. Each process needs 4 to 40 ms cpu time (a random number), and each process arrives at ready queue within the first 8 ms. Write a program that simulate RR scheduling. The time quantum should be specified by user and it should be within the range of 2 20 ms. Context switching takes 0ms n this simulation. At the end of simulation, your program should output following fields for each process:

Proc # Initial enqueuer Time CPU time End time Total time

Developing procedure:

1-Get IDE ready.

2-Learn how to use Java LinkedList as a queue. Also, we will need to use ArrayList to store created process.

3-Create a class for Process. It should have at least three fields: arrival time, cpu time and exec time.

4-Create a 10 process objects and place them into an ArrayList. For each process object, arrival_time, cpu_time we are assigned with different random number.

5-Write a loop that mimics the clock. It starts with 0 and ends when there are no more processes.

6-On the finish of each process, print out the required information.

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!