推 kiwidoit:嗯~~感謝 來去研究一下你的算法@@ 05/10 13:57
※ 引述《kiwidoit (橘子愛玉~>_^)》之銘言:
: 題目如題下:
: Multiple choices-please circle all correct answers
: Consider a machine, whose floating-point(FP) and multimedia(MMX)
: instructions have two times throuthput than integer(INT) instructions.
: Suppose we enhance the machine by making FP and MMX instructions 4 and
: 2 times faster, respectively, with no improvements to the INT instructions,
: -------------------------------------------------------------------------------
: which of the following statements are correct?
: (A)The enhancement comes from an increased clock rate.
: (B)The enhancement comes from increased cache sizes.
: (C)Two benchmarks both consist of only INT, FP, and MMX instructions.
: the mix of instructions of the two benchmarks are 1:3:6 and 2:4:4,
: respectively(INT:FP:MMX).The first benchmark is more ideal to show
: off the enhanced machine.
: (D)It is impossible to speedup the first benchmark in (C) six times on the
: enhanced machine.
: 答案是:CD
: 我覺得(A)錯的原因是因為fast instruction不會影響clock rate
: 可是其他BCD選項我就不知道為什麼了@@"
: 有請各位板眾幫忙解題.....
這題是交大考題吧?
(A)(B)如果為True,則應該是不論哪種指令都會變快
(C)
假設INT FP MMX 每指令CYCLE數為 2 1 1
改進後 2 0.5 0.25
若指令比例為1:3:6
2*1 + 1*3 + 1*6 11
speedup= ---------------------- = ------ = 2.2
2*1 + 0.5*3 + 0.25*6 5
若比例為2:4:4
2*2 + 1*4 + 1*4 12
speedup= ---------------------- = ------ =1.71
2*2 + 0.5*4 + 0.25*4 7
顯然第一種較有利
(D)
2*1 + 1*3 + 1*6
Max speedup = --------------------- = 5.5
2*1
--
此種題目必需用幾何平均,不能用一般amdual式子把某部份直接除去改進倍率
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.41.223.186
※ 編輯: privatewind 來自: 114.41.223.186 (05/09 22:53)