Question: Process Scheduling Algorithms This assignment will give you experience with process scheduling algorithms. Write a Java program that performs runs of the following process scheduling

Process Scheduling Algorithms

This assignment will give you experience with process scheduling algorithms. Write a Java program that performs runs of the following process scheduling algorithms: Round Robin(RR) [preemptive]

Run each algorithm for 100 quanta (time slices), labeled 0 through 99. Before each run, generate a set of simulated processes. For each simulated process, randomly generate

An arrival time: a float value from 0 through 99 (measured in quanta).

An expected total run time: a float value from 0.1 through 10 quanta.

A priority: integer 1, 2, 3, or 4 (1 is highest)

Assume only one process queue. Sort the simulated processes so that they enter the queue in arrival time order. Your process scheduler can do process switching only at the start of each time quantum. For this assignment, only consider CPU time for each process (no I/O wait times). For RR, use a time slice of 1 quantum.

Each simulation run should last until the completion of the last process, even if it goes beyond 100 quanta. No process should get the CPU for the first time after time quantum 99. How many simulated processes should you create before each algorithm run? Create enough so that the CPU is never idle for more than 2 consecutive quanta waiting for work to do, except possibly at the very beginning of each run. Its OK to create more processes for a run than you can actually use. Run each algorithm 5 times to get averages for the statistics below. Before each run, clear the process queue and create a new set of simulated processes.

Outputs for each algorithm run (total 30 runs)

Each created processs name (such as A, B, C, ...), arrival time, expected run time, and priority.

A time chart of the 100+ quanta, such as ABCDABCD ... Show a processs name in a quantum even if it completed execution before the end of that quantum (so then the CPU is idle at least until the start of the next quantum).

Calculated statistics for the processes during the run: Average turnaround time Average waiting time Average response time

Calculated statistic for the algorithm for the run: Throughput

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!