comparison in speed between the processor and the hard disk I'm reading through William Stalling's operating system intrnals and design principles book. Talking about interrupts, it gives the following examples when comparing the speed of a processor and a hard disk:


  To give a specific example, consider a PC that operates at 1 GHz, which would
  allow roughly 10^9 instructions per second. A typical hard disk has a rotational speed
  of 7200 revolutions per minute for a half-track rotation time of 4 ms, which is 4 million
  times slower than the processor.


My question is how was the result calculated? How did we know that the hard disk is 4 million times slower?
This is to some extent a comparison between apples and oranges. The assumption is that the basic operation on a CPU takes 1 ns (since the clock frequency is 1 GHz), whereas a basic operation on the hard disk takes 4 ms. The quoted factor is just 4 ms / 1 ns = 4&times;106.