Crea sito

Clock Rate calculation exercise with Solution

Problem:

Our favorite program runs in 1.5 seconds on computer A, which has a 700 Mhz. Clock Rate. We are trying to help a computer designer build a new (faster) machine B. The designer can use new technology to substantially increase the clock rate, but has informed us that this increase will affect the rest of the CPU design, causing machine B to require 2 times as many clock cycles as machine A for the same program. What clock rate is therefore necessary for machine B, if we want it to be able to run our “favorite program” in just 1 second?

Solution:

CR = Clock Rate ( CR(b) -> Clock Rate of computer B )

C = the increase constant of the clock cycles (in this case 2)

CC = Clock Cycle ( CC(a) – > Clock Cycles of computer A )

RUN = Running Time ( RUN(b) – > in this case 1s)

The formula is this:

CR(b) = (X * CC(a)) / RUN(b)

= (2 * CC(a)) / 1

CC(a) = RUN(a) * CR(a)

= 1.5 * 700 * 10^6

So the final complete solution is:

CR(b) = (2 * 1.5 * 700 * 10^6 ) / 1 = 2.1 GHz

The computer B will run in 2.1 GHz to execute the program P in 1 second.

 

For any question or explanation write a comment, I will answer you in a few hours 🙂