📜  门| GATE-IT-2004 |第 50 题

📅  最后修改于: 2021-09-26 03:17:01             🧑  作者: Mango

在CPU设计的增强中,浮点单元的速度提高了20%,定点单元的速度提高了10%。如果浮点运算次数与定点运算次数之比为 2:3 且浮点运算所用的时间是原设计中定点运算所用时间的两倍,则总体加速比是多少?
(一) 1.155
(乙) 1.185
(C) 1.255
(四) 1.285答案:(一)
说明:加速 = 原始设计所用时间/增强设计所用时间

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 提供的。
这个问题的测验