Com Sci 230
Homeworks for the Current Quarter
Last modified: Mon Mar 30 10:54:18 CST
Hand in this written exercise by electronic mail to ilia@cs. Send it by 7:30 AM, Tuesday 10 October. See homework instructions for more detail.
Do Problems 1.4, 1.5, 1.6, and 1.10 from pages 35-36 of the text.
Discuss the following problems on HyperNews. I will provide a starting comment, under the Class Work article, for each one. There is no particular due date, but there should be significant ideas posted in the next week. See the Written Exercise #2
Hand in this written exercise by electronic mail to ilia@cs.uchicago.edu. Send it by 7:30 AM, Monday 16 October. See homework instructions for more detail.
Do Problems 2.1, 2.2, 2.5 on page 96 of the text.
So, you must provide 9 simple formulae, expressed in terms of N and T, giving the Turnaround, Throughput, and CPU Utilization under 1, 2, and 4 simultaneous jobs. First, draw a picture of the CPU and I/O activity. Assume that all jobs are submitted at the same time. Each job exercises a different I/O channel, so all of them may do I/O simultaneously, but only one can use the CPU at a given time. Draw your picture in units of T/4. For example, the picture for 1 job by itself looks like this:
For more than one job, each job gets its own I/O line in the picture, but all 2 or 4 must interleave on the single CPU line. Use round-robin scheduling, where the CPU serves job 1, then 2, then 3, then 4, then 1, etc. If you draw the picture through four computation periods for each job, you should see the pattern, and you should be able to work out the formulae intuitively. For Turnaround time, give the time for the last job to complete. The Turnaround for the first job, and the average, are a bit more complicated, but the difference between the completion of the first job and the last is always less than 2T, so the Turnaround for the last job gives a pretty clear idea of the trend. Since the longest Turnaround is the same as the total time to complete all the jobs, the Throughput is just the number of jobs divided by the Turnaround. The Utilization is the total CPU time divided by the Turnaround: since each job spends time NT/2 on the CPU, this is pretty easy, too.CPU: 11 11 11 11 11 11 ... I/O: 11 1 111 1 111 1 1 ...
The exact formulae in terms of N and
T are rather simple ratios, but some of them contain a small
amount of noise that obscures the important trend. After working
out the exact formulae, approximate some of them on the assumption that
N is very large. For very large N,
N+1 is approximately the same as N. If you do
all of this correctly, it should be easy to see that the
Turnaround increases slightly from 1 job to 2, and then
essentially doubles for 4 jobs. The Throughput increases by a
substantial factor from 1 job to 2, and essentially doubles from
1 job to 4. The Utilization is low for 1 job, a large fraction
for 2, and essentially 1 for 4.
Due Wednesday, 8 November 1995, at 7:30 AM.
Due Wednesday, 29 November 1995, at 7:30 AM.
Due Friday, 15 December 1995, at 7:30 AM.