看板 TransCSI 關於我們 聯絡資訊
※ 引述《future1234 (Low)》之銘言: : ※ 引述《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) 中間那段過程似乎怪怪的 computer X: 10 = cpu clock cycles / 5 GHz computer Y: 6 = 1.2 * cpu clock cycles / C GHz => C = 10 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.45.54.125
future1234:1.2 times as many clock cycles as computer X 05/18 18:21
future1234:我把它看成效能來做計算了 , 那就算clock cycle就好哩 05/18 18:22