A processor operates at a clock rate of 1.6 GHz yet has a varying CPI for different instruction types. A given program has 400 ALU instructions which take the processor 7 cycles complete each instruction. It has 300 memory instructions that take 12 cycles to cycles to complete each instruction. It also has 90 branching operations that take 21 cycles to cycles to complete each instruction. How long does it take to execute this program

Respuesta :

Answer:

0.0051825 ms

Explanation:

From the given information:

The clock time is = [tex]\dfrac{1}{clok \ rate}[/tex]

[tex]=\dfrac{1}{6} Ghz[/tex]

[tex]=\dfrac{1}{6}\times 10^9[/tex]

To milliseconds, we have;

= 0.000000625 ms

However, the execution time is the sum total of all instruction types multiplied by the ratio of cycles taken per instruction and cycle time.

Mathematically;

Execution time is: [tex]\Bigg[Sum \ of \ all \Big(instruction \ type \times \dfrac{cycles taken }{instruction} \Big) \Bigg] \times cycle \ time[/tex]

Recall that:

the cycles taken according to the ALU = 400 × 7 =2800

cycles required according to the memory instructions = 300 × 12 = 3600

cycles for branching = 90×21 = 1890

THUS;

Total cycles = 2800 + 3600 + 1890

= 8290 cycles

Finally, execution time = 8290 cycles × 0.000000625 ms

= 0.0051825 ms

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE