在CPU的设计的增强中,浮点单元的速度已经增加了20%,而定点单元的速度已经增加了10%。如果浮点运算次数与定点运算次数之比为2:3,并且浮点运算所花费的时间是原始设计中定点运算所花费时间的两倍,那么整体速度将提高多少?
(A) 1.155
(B) 1.185
[C) 1.255
(D) 1.285答案: (A)
说明:加速=原始设计所花费的时间/增强设计所花费的时间
In original design:
Ratio of floating point operations to fixed point operations = 2:3
Therefore let floating point operations be 2n and fixed point operations be 3n.
Ratio of time taken by floating point operation to fixed point operation =2:1
Therefore let time taken by floating point operation be 2t and by fixed point
operation be t.
Time taken by the original design = (2n * 2t) + (3n * t) = 7nt
In Enhanced design:
As the speed of the floating point operation is increased by
20% (1.2 * original speed) time taken for a floating point operation
would be 83.33% of the original time (original time/1.2)(This is because CPU
speed(S) is inversely proportional to execution time (T) hence if speed becomes
1.2S time would become T/1.2 )
Similarly for a of fixed point operation speed is increased by 10% (1.1 * original
speed), it means the time taken now would be 90.91% of the original time
(original time / 1.1) taken in case of fixed point operation.
Time taken by enhanced design= (2n * 2t /1.2) + (3n * t /1.1) = 6.06nt
加速= 7nt / 6.06nt = 1.155
该解释由Yashika Arora提供。
这个问题的测验