Question: Implement a program that simulates all three scheduling algorithms above ( or , alternatively, one separate program for each algorithm ) , which interactively obtains
Implement a program that simulates all three scheduling algorithms above or alternatively, one separate program for each algorithm which interactively obtains the simulation data from the user, consisting of the processes of single bursts to execute and their respective CPU burst times in integer time units eg ms For simplicity assume negligible context switch times and arrival times of zero. Also assume a quantum of time units for the RR algorithm. For every run of the simulation output the following information: the interleaving of processes through time, their respective waiting and turnaround times, and the average waiting and turnaround time. Eg if the following data is supplied for RoundRobin:
tableProcessBurst time
The program should produce a similar output to the following:
Order of execution: P P P P P
Waiting times:
Turnaround times:
Avg. waiting time ; Avg. turnaround time
Task II
Based on the work from Task I, enhance the FCFS SJF and RR implementations so that process data are generated randomly. The simulation should be able to generate data for a usersupplied number of processes with random burst times between two usersupplied positive integers ie minimum burst time, and maximum burst time
Run a sufficient number of simulations eg times for ranges:
to
to
to
and measure the average waiting times for all three algorithms. Project the results of average waiting time versus algorithm in bar charts. Do you observe any trend as the range of process burst times becomes wider? in java programming
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
