Consider the two computers A and B with the clock cycle times 100 ps and 150 ps respectively for some program. The number of cycles per instruction (CPI) for A and B are 2.0 and 1.0 respectively for the same program. Which computer is faster and how much? a) A is 1.33 times faster than B b) Bis 1.22 times faster than A c) A is 1.23 times faster than B d) B is 1.33 times faster than A

Respuesta :

Answer:

Option d) B is 1.33 times faster than A

Given:

Clock time, [tex]t_{A} = 100 ps[/tex]

[tex]t_{A} = 150 ps[/tex]

No. of cycles per instructions,  [tex]n_{A} = 2.0[/tex]

[tex]n_{B} = 1.0[/tex]

Solution:

Let I be the no. of instructions for the program.

CPU clock cycle, [tex]f_{A}[/tex] = 2.0 I

CPU clock cycle, [tex]f_{B}[/tex] = 1.0 I

Now,

CPU time for each can be calculated as:

CPU time, T = [tex]CPU clock cycle\times clock time[/tex]

[tex]T_{A} = f_{A}\times t_{A} = 2.0 I\times 100 = 200 I ps[/tex]

[tex]T_{B} = f_{B}\times t_{B} = 1.0 I\times 100 = 150 I ps[/tex]

Thus B is faster than A

Now,

[tex]\frac{Performance of A}{Performance of B} = \frac{T_{A}}{T_{B}}[/tex]

[tex]\frac{Performance of A}{Performance of B} = \frac{200}{150}[/tex]

Performance of B is 1.33 times that of A

Clock cycle times of Computer A  =100ps

Number of cycle per instruction (CPI) = 2

Time Required Per instruction = Clock times * CPI =100 * 2 = 200 ps

clock cycle times of Computer B =150ps

Number of cycle per instruction(CPI) = 1

Time Required Per instruction = Clock times * CPI 150 * 1 = 150 ps

Computer B requires less time than Computer A per instruction

So, Computer B is Faster

Computer B is Faster 200 - 150 = 50ps Faster Per instruction

ACCESS MORE