Sale!

CS39002 Assignment 3 Simulation of CPU Scheduling Algorithms solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (4 votes)

The objective of this assignment is to evaluate various process scheduling strategies.
This is achieved by generating random arrival times and CPU bursts for a set of
processes following some probability distribution, and determining the performances of
the chosen scheduling algorithms through simulation. The specifications for the problem
are as follows.
a) Read the number of processes N, and generate the arrival times and CPU bursts
of the processes using some probability distribution. The first process is
assumed to arrive at time 0; for all subsequent processes the inter-arrival time is
generated as a random variable (between 0 and 10) following exponential
distribution with some given mean. Also the CPU bursts of the processes are
generated as uniform random variables (between 1 and 20). Save the generated
table in a file.
Hint: If R is a uniform random number in the range (0, 1), a random variable from
an exponential distribution with mean  can be generated as:
(-1.0 / ) * ln R
b) Simulate the following CPU scheduling algorithms on the process arrival trace as
generated in (a) above, and compute the average turnaround times (ATN) for the
processes:
(i) Non-preemptive First Come First Serve (FCFS)
(ii) Non-preemptive Shortest Job First
(iii) Pre-emptive Shortest Job First
(iv) Round Robin with time quantum δ = 2 time units
(v) Highest response-ratio next (HRN)
c) Run the simulation for N = 10, 50 and 100, ten times for each value of N using a
shell script (bash/python), and generate the plot comparing the average values
of ATN obtained for various scheduling techniques for different values of N.
d) For FCFS (non-preemptive) determine the theoretically expected lower bound on
the turn-around time and check whether that is satisfied by your simulation.
Submission Guideline:
 Create the program as a single file as a3_.c or .cpp. Create the
plot file as a3_plot_.pdf . Upload the two files.
Evaluation Guidelines:
While entering marks, the partwise break up should also be entered according to the
marking guidelines given below. There is a separate component for individual
assessment, based on how the student answers questions.
Sl Items Marks
(a) Random number generation (uniform, exponential) 8
(b) Maintaining job queues for scheduling 8
(c) Simulation of five scheduling strategies 15
(d) Generation of results and plots 15
(e) Shell script for running the jobs 4
(f) Theoretical analysis of FCFS 5
Total 55