Processen en processoren/Planning/Practica/Practicum 3

Uit Werkplaats
Ga naar: navigatie, zoeken
Processen en processoren

Categorie Comment for P&P is niet gevonden

Simulating a Round-Robin Scheduler

Assignment

In this assignment, you will study the effect of several parameters used within RR scheduling. You must write a discrete simulation to study the performance of this strategy for different time quanta and different context switching times. Do this by writing a simulation program to imitate the behavior of a single-CPU system that has a preemptive RR scheduler.

Instructions

You may use you favorite programming language to write the simulator. Create an input file to represent process arrival and service times, where each line represents a process arriving into you simulated system. The first number is the arrival time (in integer seconds), and the second number is the amount of time the process requires to complete (in floating-point seconds). For example, the first several lines of the file might look like

30 0.783560
54 17.282004
97 32.814522
133 39.986730
163 42.805902
181 28.249353
204 45.561030
249 26.369485
287 48.582049
325 37.274777
365 37.144992
399 22.059136
424 47.168534
455 20.090157
488 56.053016
531 39.640908
572 0.717403
610 34.732701
637 21.593761
658 48.477451
685 21.472914
729 44.603773

This means the first process arrives at time 30 and requests 0.783560 seconds of CPU time; the second at time 54; and so on. Run simulation experiments using context switching times of 0, 5, 10, 15, 20, and 25 milliseconds and time quanta of 50, 100, 250, and 500 milliseconds.

Using at least the arrival/service times given above, determine (for each pair of parameters) the average response time, the average turnaround time, the average normalized turnaround time, and the fraction of time the processor is busy.

Please mail me your source code, plus a piece of text in which you carefully explain your program and the issues you ran into, present the outcomes of your simulation experiments (in a table or via graphs), and (important) interpret these outcomes. What is the optimal parameter setting?

I should have received your solution by July 1.