CS 3733 Operating Systems, Spring 2000 Assignment 2


Parts 0 and 1 Due Monday, February 14, 2000
Parts 2 and 3 Due Friday, February 25

Note: You have some extra time to turn in this assignment because of the problems that some are having with the simulator. You should try to get this assignment done by February 18, because a new assignment will be out by then.


In this assignment you will explore the topic of CPU scheduling by using the scheduling simulator described in class. You can find out more about the simulator at the web site: /nsf/process_scheduling.html.
A copy of the simulator user's guide can be found at /nsf/ps_doc/psdoc.html.
These links are also available from the course web page.

You might want to read about the experiences students had with the simulator in a previous semester in a paper available at /nsf/pubs/process.html.

Part 0

In this part you will run the simulator remotely and create a remote log file.

Look for the link Run the simulator remotely with log placed on vip on the course web page. Use this link to run the simulator.

Click on the Open Log button. You will be prompted to enter your username. Enter the name you use to log into our Sun network.

Click Open Log again and the button should change to Close Log.

Click on Run Experiment and then Log All Table Data.

Click on Draw Graph and then the Log button on the graph. It may take a few seconds while the graph is converted into a GIF and then sent over the network.

Click on Draw Gantt Chart and choose the first one.

Adjust the size so that the entire chart is shown. You can use the Controls to change the height of the bars.

Click on the Log button on the Gantt chart.

Do the same for the second Gantt chart.

Close the log file and then click on Show Remote Log.

If all went well, the log file should pop up in a new browser window.

Print out the log file and hand it in.

Part 1

If you have not already done so, create a web page for yourself.
The address of your web page should be http://www.cs.utsa.edu/~username. Create a course web page with web address http://www.cs.utsa.edu/~username/cs3733/index.html. This should be globally accessible. Your course web page should be very simple without much graphics so that it will load quickly over a phone line.

Make a cs3733/assign2/part1, directory under your public_html directory. The permissions of the public_html, cs3733, assign2, and part1 directories should be drwxr-xr-x.

Make a directory somewhere in your account for this assignment called assign2. Do not put this under public_html. The permissions of this directory should be set so that only you have access to it. Make a subdirectory called part1. Copy all of the files from /usr/local/courses/java/psfiles/ into your part1 directory. Edit the psconfig file and change my name to yours. Make sure that your path includes /usr/local/courses/java/bin. Run the simulator using runps which is a script in this directory. This will run the simulator using Java 2. A few of the machines in the lab will not run Java 2. If you find a machine that will not, send me a mail message about which machine it is. You can use runps1 on these machines instead.

Run the simulator in the same way you did for Part 0. This will create a log file in your part1 directory along with three GIF files.

Copy these files into your assign2/part1 directory under you public_html. Set the permissions so that they are all world readable. Put a link to the log file in your course web page. Make sure you (and others) can access this log file through your link. Print out the log file and turn it in.

When you have completed Parts 0 and 1 of this assignment, send me email with the subject CS 3733 Assignment 2, Parts 0 and 1 complete.

Part 2

Consider 20 processes all arriving at the same time, all with duration 1000. Ten of the processes have constant CPU bursts of 30. The other 10 have CPU bursts uniformly distributed between 100 and 200. Use the SJF scheduling algorithm. Perform an experiment with two runs, one in which all of the I/O bursts are 50 units and one in which they are all 3000 units. Create an HTML log containing tables of statistics, graphs, and Gantt charts to show the results of the two runs.

Estimate the load average for each of the runs. The load average is defined as the average number of processes in the ready queue. This information is not directly available from the simulation statistics, but can be calculated as the total waiting time divided by the time for the experiment.

Do an analysis of the results of the experiment. What does this experiment show? If the units are in microseconds, which of these runs would be more like real processes? Why?

Put everything in one HTML file with your comments and analysis at the end. (You can edit the HTML file with an editor. Just be sure to separate paragraphs with the HTML paragraph separator tag.)

Turn in a printout of your log file.

Part 3

Consider the following statement:
If the CPU utilization is high, then the average waiting time is proportional to the number of processes.
You are to design an experiment to test whether this statement might be true.

Describe in words a collection of processes and scheduling algorithm on which you will test this statement. Then design an experiment to test the results. Your experiment should have runs which are identical, except for the number of processes. Do several runs, only changing the number of processes. Don't let the number of processes get too large it will take too much time to complete the experiment and you may run out of memory. You should confirm that the CPU utilization is high for each of the runs, and analyze the results, to see if they confirm or contradict the statement.

As in Part 2, put your description and analysis at the end of the HTML file, print it out and turn it in.


If you have a machine at home with Java installed, you can run the simulator at home by downloading the simulator code. Click here for more details.