MCS-378 Lab 1: Scheduling Experiments, Fall 2013

Due: September 17, 2013

Introduction

In this lab,you will experiment with how multiple threads are scheduled, trying out all four combinations that arise from two possibilities for each of two variables. You will vary the scheduling algorithm between Linux's normal CFS scheduler and FIFO fixed-priority scheduling. You will also vary the number of processors between 1 and 2. This is Exploration Project 3.3 from pages 85-89 of the textbook, although I provide some additional instructions here regarding what I'm looking for in your lab report. The Exploration Project contains a threads.cpp program split over Figures 3.12 and 3.13 (pages 86-87); I've linked the entire program here for your use.

Characterizing Your Experimental Environment

You are conducting a scientific experiment and writing a scientific report. As such, it is important that you report not only the data you obtain (and your interpretation of it), but also the conditions under which that data was obtained. This allows readers to more fully understand your results, and it also provides the necessary information for anyone who wants to replicate or extend your experiment.

Your report should specify the exact version of Linux you used and a reasonable level of detail about the hardware: processor model name and clock speed, memory size, and disk drive model. One place you can find these pieces of information in /proc/version, /proc/cpuinfo, /proc/meminfo, and /proc/scsi/scsi. Ask if you need help locating the appropriate information.

About Predictions

Each part of the Exploration Project asks you what you would expect to happen under a particular circumstance, asks you why you expect that, and then tells you what to do in order to to test your prediction. It is important that you think through a prediction and explanation first before you find out the reality.

If you test your prediction and find it was incorrect, what then? If that happens, I would like you to go back to thinking about the scheduling situation and try to figure out where you went wrong in your initial analysis. Now that you know what really happens, can you come up with an explanation of why that happens? If after some effort you still can't come up with a reasonable explanation of the phenomenon you observed, it would be appropriate to consult me.

I expect to see all of these components in your lab report: your initial predication and how you justified it, the actual behavior you observed, and your explanation of that observation if your initial prediction was incorrect.

Your Report

You should submit a report, either by emailing me a PDF or by turning in stapled hardcopy, which succinctly explains all four experiments, including the contextual information and interpretation described above. Your target audience is people familiar with CFS and fixed-priority scheduling at the level contained in our textbook, but who are not familiar with the Exploration Project itself. Feel free to use diagrams as well as text if that helps you express your explanations.


Instructor: Max Hailperin