Our favorite program runs in 10 seconds on computer A, which has a 2 GHz clock. We are trying to help a computer designer build a computer, B, which will run this program in 6 seconds. The designer has determined that a substantial increase in the clock rate is possible, but this increase will affect the rest of the CPU design, causing computer B to require 1.2 times as many clock cycles as computer A for this program. What clock rate should we tell the designer to target?

Respuesta :

Answer:

4 GHz

Explanation:

Time taken for computer A to execute the program is = 10 secs

Given frequency of the clock for computer A is = 2 GHz

We know Clock period = 1 / frequency = 1 / 2 * 109 = 0.5 ns

Number of clocks requried to execute the program in computer A is

= Total Execution time / clock period = 10 / 0.5 * 10-9 = 20 * 109 clocks

Given Time taken for computer B to execute the program is = 6 secs

Given computer B requries 1.2 times as many clocks as computer A

implies number of clocks to execute program in computer B = 1.2 * 20 * 109 = 24 * 109

Here clock period of computer B = Total execution time / number of clocks

                               = 6 secs / 24 * 109

                               = 0.25 ns

Hence clock rate = frequency is = 1 / clock period = 1 / 0.25 ns = 4 GHz.

Clock rate is simply the number of clock cycles a computer can perform in a second

Computer B should be designed to have a clock rate of 4GHz

The given parameters are:

[tex]\mathbf{t_A = 10s}[/tex] --- time on computer A

[tex]\mathbf{c_A = 2GHz}[/tex] --- computer A clock

[tex]\mathbf{t_B = 6s}[/tex] --- time on computer B

Start by calculating the period of computer A

[tex]\mathbf{T_A = \frac{1}{c_A}}[/tex]

So, we have:

[tex]\mathbf{T_A = \frac{1}{2GHz}}[/tex]

Rewrite as:

[tex]\mathbf{T_A = \frac{1}{2 \times 10^9 Hz}}[/tex]

So, we have:

[tex]\mathbf{T_A = 0.5 \times 10^{-9} s}}[/tex]

Next, we calculate the required number of clocks on computer A

[tex]\mathbf{n_A = \frac{t_A}{T_A}}[/tex]

So, we have:

[tex]\mathbf{n_A = \frac{10}{0.5 \times 10^{-9}}}[/tex]

[tex]\mathbf{n_A = 20 \times 10^{9}}[/tex]

Computer B requires 1.2 times as many clock cycles as A.

So, we have:

[tex]\mathbf{n_B = 1.2 \times n_A}[/tex]

This gives

[tex]\mathbf{n_B =1.2 \times 20 \times 10^{9}}[/tex]

[tex]\mathbf{n_B =24 \times 10^{9}}[/tex]

The clock period of computer B is:

[tex]\mathbf{T_B = \frac{t_B}{n_B}}[/tex]

So, we have:

[tex]\mathbf{T_B = \frac{6}{24 \times 10^{9}}}[/tex]

[tex]\mathbf{T_B = 0.25 \times 10^{-9}}[/tex]

Lastly, the clock rate of computer B is:

[tex]\mathbf{c_B = \frac{1}{T_B}}[/tex]

[tex]\mathbf{c_B = \frac{1}{0.25 \times 10^{-9}}}[/tex]

[tex]\mathbf{c_B = 4 \times 10^{9}}[/tex]

Express in gigahertz

[tex]\mathbf{c_B = 4 GHz}[/tex]

Hence, computer B should be designed to have a clock rate of 4GHz

Read more about clock rates at:

https://brainly.com/question/14241825