CS 3733 Operating Systems, Fall 2003 Assignment 2


Due Thursday, October 2, 2003

In this assignment you will be using the process scheduling simulator that was discussed in class and used in the recitation sections.

Part 0:
Copy all of the files from your assign2/rec02 directory into a new directory, assign2/main. You should be able to run the simulator in the Sun lab as well as in the Linux lab.

Part 1:
In a time-sharing system, each process looks as if it has exclusive access to the CPU, but the CPU may seem to be slower than it actually is because of competition with other processes. Consider the following statement: If 20 similar processes are scheduled using Round Robin with a small enough quantum, the result for one of the processes is similar to running it on a non-timesharing system with no other processes, but using a CPU that is 20 times slower.

Write a few sentences indicating whether you agree or disagree with this statement. Assume that the time to do the scheduling and the context switch can be ignored.

Part 2:

Think about what it would mean to test the statement in Part 1 using a simulator. Answer the following questions.

  1. To what value would you compare the quantum to know if it is small enough?
  2. Which simulator parameters need to change to simulate a CPU that is 20 times slower?
  3. What can you say about the average waiting time when there is only one process?
  4. Which performance measurements would you use to test the statement in Part 1?
Part 3
Use the simulator to perform an experiment to back up your statement in Part 1. In one run you should have a single process. You can use the FCFS scheduling algorithm which will always schedule the process for its full CPU burst. In other runs use Round Robin with 20 processes and make the quantum smaller and smaller. Compare the results.

Create a log file containing tabular data and Gantt charts. Write a paragraph explaining what your experiment does and how well it supports what you wrote in Part 1. Be specific and refer to numbers given in your tables or to the Gantt charts.


Handing in your assignment:
Make your own cover sheet and put your name on it. The cover sheet should also have the course number, assignment number and date. Include the following in the order given. Start each on a new page.

  1. The cover sheet.
  2. Answers to Part 1.
  3. Answers to Part 2.
  4. Log file produced by your simulator in Part 3.
  5. Paragraph written for Part 3.