General rules: Create homework, compose specifications or any text by using a common document-creation tool, such as Microsoft® Word. Abstract: Compute the performance data for the schedulers of three...

1 answer below »

General rules: Create homework, compose specifications or any text by using a common document-creation tool, such as Microsoft® Word.




Abstract: Compute the performance data for the schedulers of three Operating Systems. Do not get scared! Only the timing for each scheduler is of interest. You measure these data by implementing a simple simulator. The simulator measures key performance data, such as throughput, wait time, and turn-around time.




One OS is a strict batch system with a non-preemptive First Come First Serve (FCFS) scheduler. The second OS uses also a non-preemptive, High-Priority First (HPF) scheduler, while the third OS uses a preemptive Round Robin (RR) scheduler with a variable time-quantum and varying context switch overhead. Design meaningful input data, run them through all schedulers, generate output data, interpret and discuss the results. To start your simulations, use the sample data in this HW assignment; but also provide 2 additional, meaningful input scenarios, and generate their execution schedules.




Detail: Your HomeWork consists of the following parts with equal weight each:




  1. Compute performance data for the scheduler of a non-preemptive FCFS batch system






  1. Ditto for a non-preemptive HPF batch system, and






  1. Ditto for a preemptive RR scheduler; vary also the time quantum overhead






  1. Invent meaningful input data; run them through your schedulers to produce output




  2. Discuss very briefly the generated output data. Hand all your work in printed form






Turn in only your inputs and the generated output data. There is no need to turn in the actual source program that computed and printed the output. But you must have completely designed, implemented, debugged, and the executed your simulator.




Input to each scheduler is a list of processes, for which you know the execution time in milliseconds. Each process is represented by a triple of decimal numbers id, time, priority. All processes are scheduled and compete for the CPU resource. Here id is the name of a process; time is the time in milliseconds that process id needs to run to completion, and priority is the priority of process id. Not all triple information is needed by all simulations. A possible input sample for two processes with id 1 and id 4 could be:




id time priority


123



4506




Depending on the scheduler, the priority may be irrelevant; in that case your simulator just ignores that portion of input. The meaning of triples is as follows:




1 2 3process 1 uses 2 milliseconds to run, has priority 3, with priority 0 being highest


4 50 6process 4 uses 50 milliseconds, has priority 6, with 0 being the highest




Use the definitions below to compute for each process Throughput, Wait Time, and Turn-around Time. Compute these for each of the 3 schedulers; also compute the average for all processes.




For the preemptive RR scheduler, vary the time quantum q from 1 to 5 milliseconds (ms). Also, for each q selected, vary the overhead o of a context switch from 0 ms up to q itself. There is no need to vary the o beyond q. When a process scheduled by the RR system has received all time needed to completion, do not add a final o unit in the computation of the total time for that process. Also the first time around, act as if the initial schedule overhead o is 0. Use the sample outputs below as a guide for the detail you should generate for this HW.




Definitions:




Throughput:Number of jobs (processes) completed per time unit


Wait Time:The total time a process is in Ready Queue


Average Wait Time:Average Wait Time of n processes is: total wait time by n


Turn-around Time:span of time from moment of submission to completion time



Answered 3 days AfterOct 25, 2021

Answer To: General rules: Create homework, compose specifications or any text by using a common...

Ketaki answered on Oct 28 2021
128 Votes
// Java program for implementation of FCFS
// scheduling with different arrival time
public class
Main{
// Function to find the waiting time for all
// processes
static void findWaitingTime(int processes[], int n, int bt[], int wt[], int at[])
{
int service_time[] = new int[n];
service_time[0] = at[0];
wt[0] = 0;

// calculating waiting time
for (int i = 1; i < n ; i++)
{
//representing wasted time in queue
int wasted=0;
// Add burst time of previous processes
service_time[i] = service_time[i-1] + bt[i-1];

// Find waiting time for current process =
// sum - at[i]
wt[i] = service_time[i] - at[i];

// If waiting time for a process is in negative
// that means it is already in the ready queue
// before CPU becomes idle so its waiting time is 0
// wasted time is basically...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here