Scheduling Strategy Performance Comparison

Introduction

Simulation is a powerful tool that can be employed when designing and selecting scheduling strategies for an operating system. Such simulations allow the consideration of far more details and far more processes than theoretical comparisons. In this project you will implement and perform simulation experiments to compare the performance of two scheduling strategies for interactive time-sharing systems: Round Robin and Linux OTHER.

Simulation Development

You will be implementing your scheduling strategies using the simulation framework provided below. This simulation framework accepts as input a specification of a collection of processes. The framework then simulates the system calls and interrupts that an OS kernel would receive when executing the specified processes. The following sub-sections provide an overview of the simulation framework and outline what you must do to complete this project.

Downloading the Simulator

Compiling the Simulator

Running the Simulator

The Process Data Files

The Kernel Interface

The SystemTimer Class

The Assignment

Implement Kernel classes that perform Round Robin and Linux OTHER scheduling. When you have implemented and tested these strategies, execute simulations to compare their performance on three types of process mixes: I/O Bound Processes, CPU Bound Processes and a mix of I/O and CPU Bound Processes. Write a brief (~2 pages) summary of the experiments you performed and the results you observed.

The Scheduling Strategies & Test Cases

This section contains a brief description of each of the scheduling strategies that you are to implement and the types of test cases that you should use for your experiments.

The Round Robin Strategy

For the Round Robin strategy when a process is moved to the Running state it should be allowed to execute until it terminates, requests an I/O, its time-slice expires or it is preempted by another process becoming ready to run. New processes and processes completing I/O operations should preempt the currently running process. Use a time-slice of 50 time-units when implementing this strategy.

The Linux OTHER Strategy

The Linux OTHER strategy is described in this set of PowerPoint slides (Scheduling Strategies). When implementing this strategy use a time-slice of 50 time-units and a default priority of 5.

The Test Cases

You should begin by creating sets of processes that test the specific functionality of your scheduling algorithm. For example, for round robin you should be sure to test that the time slicing is working correctly, that processes are preempted when new processes are created and when processes return from I/O. You will also want to be sure that you handle I/O requests properly.

To help with testing and debugging your scheduling strategies the simulator is capable of generating additional debugging output. To turn on this additional output set the debug variable to true in the SystemTimer class. When debug is set to true the simulator will display messages indicating what is happening at each time step of the simulation. These messages will be quite helpful in determining if your scheduling algorithms are working correctly.

After you are sure that your implementations of the Round Robin and Linux OTHER schedulers is correct you will want to create test cases to compare their performance. You will want to have three distinct sets of test processes I/O Bound, CPU Bound and Mixed. Each set of test processes should contain at least 10 processes with a variety of arrival times. Each process should perform at least 5 CPU bursts and 4 I/O operations. You will want to select the durations of the I/O and CPU bursts to produce CPU bound and I/O bound process. For the Mixed case you can select half of the processes from your CPU bound processes and half from your I/O bound processes. Also, your processes should make use of at least two different I/O devices, though not every process needs to use both devices.

Project Write-up

You will turn in a short write-up for this project. The write-up needs to briefly explain the simulations you have performed and summarize your results. In particular you will want to be sure to compare the strategies using the standard performance metrics discussed in the PowerPoint slides (Scheduling Strategies): CPU Utilization, Throughput, Turnaround Time, Wait Time, Waiting Time and Response Time. Note that to calculate some of these metrics you will need to maintain some additional information about each process in its Process Descriptor.