65.9k views
0 votes
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

User Solominh
by
5.7k points

2 Answers

4 votes

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

User Kanad
by
5.8k points
4 votes

Answer:

Option d) B is 1.33 times faster than A

Given:

Clock time,
t_(A) = 100 ps


t_(A) = 150 ps

No. of cycles per instructions,
n_(A) = 2.0


n_(B) = 1.0

Solution:

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

CPU clock cycle,
f_(A) = 2.0 I

CPU clock cycle,
f_(B) = 1.0 I

Now,

CPU time for each can be calculated as:

CPU time, T =
CPU clock cycle* clock time


T_(A) = f_(A)* t_(A) = 2.0 I* 100 = 200 I ps


T_(B) = f_(B)* t_(B) = 1.0 I* 100 = 150 I ps

Thus B is faster than A

Now,


(Performance of A)/(Performance of B) = (T_(A))/(T_(B))


(Performance of A)/(Performance of B) = (200)/(150)

Performance of B is 1.33 times that of A

User Agostinho
by
5.9k points