CS 3733 Operating Systems, Spring 2001 Assignment 2 Comments
This assignment was graded on a basis of 30 points with 5 points for each of the
first two parts (Part 0 and Part 1) and 10 points for each of parts 2 and 3.
Comments on Part 2:
- You were supposed to explain why the results were as they were, not just
read off the results from the tables.
- SJFA is not a good approximation to SJF here because most of the waiting
time comes from the first CPU burst. SJFA cannot approximate the first
burst of each process so for this burst it behaves like FCFS.
- SJF behaves better (in average waiting time) than FCFS here because
the long processes come in first and all of the short ones have to wait
a long time under FCFS.
- PSJF behaves better then SJF here because it can preempt the fist long
process (and others).
- Here is a solution.
Comments on Part 3:
- You were to think about the conditions under which SJFA will be a good
approximation to SJF and design an experiment based on this.
- SJFA will do well in approximating SJF when:
- The first CPU bust is not significant
- For each process, the next CPU burst will be closer to the previous one
than the CPU bursts of other processes.
- A Uniform distribution of CPU bursts for one set of processes will
not be good (except by accident) since the previous burst does not give
any more information than just knowing the distribution.
- You can use two sets of processes with different constant CPU bursts
or uniform bursts that do not overlap.
- Here is one possible solution.