next up previous
Next: About this document ...

Quiz 1

1.
Assume that you have a 333 MHz processor connected to 60 ns memory. How many cycles can the processor execute in the time it takes to fetch a value from memory? cmss 333 MHz = $333 \cdot 10^6$ cycles per second. Inverting yields $1/333 \cdot 10^{-6}$ seconds per cycle, which is 3 ns. Thus, in 60 ns, the processor executes 60 / 3 = 20 cycles.

For most instructions (like addition) the processor needs to access three values (it reads two operands and writes on result). If it takes 60 ns to access each value, the processor will sit idle most of the time. That's the reason registers and caches are necessary.

2.
Let's say you have a hard disk that's 3.5 inches in diameter spinning at 3600 rpm. The average track-to-track seek time is 1ms and the data transfer rate is 10 MB/second. How long does it take, on average, to read a 1K block from disk?

cmss The average access time is the sum of the tract-to-track seek time, the rotational latency, and the data transfer time.

If the disk is spinning at 3600 rpm, then it takes 0.01666 seconds per revolution. The average rotational latency is the average time you have to wait for a sector to come around on the disk, in other words, halve a rotation, or 0.00833 seconds = 8.33 ms.

The data transfer time is the amount of data (1K) divided by the data transfer rate (10 MB per second). 10 MB per second is 10240 KB per second, which implies 1/10240 seconds per kilobyte, or 0.0977 ms.

So the total access time is (1ms + 8.33 ms + 0.0977 ms) 9.43 ms. Clearly this time is dominated by the rotational latency. That's why, for the most part, the only way to make a disk faster is to spin it faster.

3.
Imagine that you take the same disk, and make the diameter half as big and you spin it twice as fast. What is the effect on the track-to-track seek time, the rotational latency, the data transfer rate and the capacity of the disk? You may assume that the data density is unchanged.

cmss Halving the diameter of the disk probably halves the track-to-track seek time. Doubling the RPMs halves the rotational latency, and also doubles the data transfer time (more data passes under the head in any interval of time). Unfortunately, it also cuts the capacity of the disk by a factor of four, since the area decreases as the square of the radius.



 
next up previous
Next: About this document ...
Allen B. Downey
2/27/1998