看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《gsrr (下象棋)》之銘言: : http://www.lib.ntu.edu.tw/exam/graduate/97/97419.pdf : 第二題 : (d)Suppose that the application runs for 100 seconds when only one : processor is used , how many seconds would the application requires : to run on the 8-processor SMP system? : (e)For the 8-processor run,suppose the disk is transferring data during : 80% of the execution time.What is the minimal execution time even if : the system has unlimited number of processors? : 手上解答為: : (d) 40 seconds : (e) 32 seconds : 想請教各位大大: : 這兩題題意主要在敘述什麼樣的意思, : (d)及(e)小題又是如何算出? : 謝謝! (d) 前提: 八個處理器下各處理器 IO-TIME = CPU-TIME 解法: 八個處理器加速,但有一半時間做IO加速效果減半 所以加速四倍 (100-IO)/4 = CPU = IO 求得IO = 20 = CPU 所以20 + 20 = 40 (e) 依題意 八個處理器需40秒,時間分配為 0.8*40(IO) + 0.2*40(CPU) 當處理器無限 0.8*40(IO) + (0.2*40)/(很大)(CPU) = 0.8*40(IO) = 32 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.115.149.165
taitin:50%of time "a" processor has to stall 02/20 09:07
taitin:表示每個處理器有一半時間沒辦法平行運作 02/20 09:08
taitin:而不代表iotime跟cputime相等 02/20 09:08
taitin:因為剩下的50%8個CPU經過平行運作只剩50/8的時間 02/20 09:09
taitin:根據amdahl'law (不可被平行時間)+(可被平行加速時間) 02/20 09:10
taitin:50+50/8 02/20 09:10
gsrr:e小題變成80%在transfer,那與前提50%就不相同,為什麼還是使用 02/20 09:28
gsrr:(d)小題的40秒,麻煩大大解惑... 02/20 09:29
BenLinus:但切成各50似乎也怪怪的, 只有一個processor應該不會有 02/20 09:38
BenLinus:waiting to access disk 才對, 只有一個processor哩? 02/20 09:39
BenLinus:題目應該是說八個一起跑, 才會有50%的時間是在等吧? 02/20 09:39
BenLinus:啊... 我好像誤解題意了... 別理我 02/20 09:47
gsrr:我認為是不是直接100/8=12.5就是了,因為前面在講的50%, 02/20 09:50
gsrr:題目是用for example,主要在解釋他前面的敘述 02/20 09:51
gsrr:第(e)小題才是加上需等待I/O的條件. 02/20 09:52
BenLinus:直接除以8是標準錯誤吧@@ 02/20 09:57
taitin:題意應該是說,在八個運行時,每個CPU有一半時間再等DISK 02/20 21:21
taitin:第(e)小題 我寫 100*80%+100/8 跟100*80%+100/n n->∞∴80 02/20 21:23