Re: [問題] 程式執行時間算術題一問

看板TransCSI作者 (Low)時間16年前 (2009/05/17 18:41), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串2/3 (看更多)
※ 引述《fzrmitsul (我的妹妹很可愛)》之銘言: : 10.A program runs in 10 seconds on computer X, which has a 5 GHZ clock. You : are trying by increasing the clock rate to build a computer Y, that will run : the program in 6 seconds. However, the increase will cause the computer Y to : require 1.2 times as many clock cycles as computer X. What clock rate should : you design? : (A) 10 GHZ (B) 9 GHZ (C) 8 GHZ (D) 7 GHZ : 答案是A : 請問該怎麼算呢??謝謝 cpu execution time = cpu clock cycles x cycle time = cpu clock cycles / clock rate 令 Y 的clock rate為 C x 10^9 computer X: 10 = cpu clock cycles / 5 x 10^9 computer Y: 6 = cpu clock cycles / C x 10^9 又 Performance Y / Performance X = 1.2 => ( 1 / cpu execution time Y ) / (1 / cpu execution time X) = 1.2 => cpu execution time Y / cpu execution time X = 1.2 所以... 6 x C x 10^9 = 1.2 x (10 x 5 x 10^9) => 6 x C = 60 => C = 10 (GHZ) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.162.51

05/18 07:32, , 1F
謝謝f大
05/18 07:32, 1F

05/25 16:37, , 2F
有情幫推
05/25 16:37, 2F
文章代碼(AID): #1A3-dgJQ (TransCSI)
討論串 (同標題文章)
文章代碼(AID): #1A3-dgJQ (TransCSI)