Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description / ScenarioOne method commonly used by researchers and OS designers to evaluate the performance of CPU scheduling algorithms is through simulations. Running simulations involve

Description / ScenarioOne method commonly used by researchers and OS designers to evaluate the performance of CPU scheduling algorithms is through simulations. Running simulations involve programming the models of the scheduling algorithms, using any necessary data structures and variables to represent the system state through time. As the simulation executes, various indicators of algorithm performance are gathered and outputted to the user. The data to drive simulations (processes, CPU burst times, arrivals, and so on) is either fed by the user or generated randomly.In this coursework you are required to provide a simple implementation, in Java programming language of three CPU scheduling algorithms: non-preemptive First-Come First-Served (FCFS), non-preemptive Shortest-Job-First (SJF), and Round Robin. You are free to use either a Command Line or Graphical Interface, whichever is more convenient for you.Task IImplement 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 (e.g. ms). For simplicity assume negligible context switch times and arrival times of zero. Also assume a quantum of 5 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.E.g. if the following data is supplied for Round-Robin: ProcessBurst timeP113P23P34 The program should produce a similar output to the following:Address: Telephone: +355-(0)44512345 Rr. Kodra e Diellit, Selit Web site: http://www.unyt.edu.al Tirana, AlbaniaOrder of execution: P1(5), P2(3), P3(4), P1(5), P1(3) Waiting times:P1=7P2=5P3=8Turnaround times: P1=20P2=8P3=12Avg. waiting time =6.67; Avg. turnaround time =13.33Task IIBased 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 user-supplied number n of processes with random burst times between two user-supplied positive integers (i.e. minimum burst time, and maximum burst time).Run a sufficient number of simulations (e.g.>10 times) for ranges: 8 to 125 to 151 to 20and 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?SubmissionStudents are expected to submit: Short report documenting the results. It should describe the high level logic and design of the program(s), how it is installed / executed and how it is used, with sample screenshots. For point b) it should describe the results collected from the simulation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions