看板 Grad-ProbAsk 關於我們 聯絡資訊
97台大資工計組第2題(d)題目重點如下: An application has been fully parallelized to run on a SMP system, but for an 8-processor run, 50% of time a processor has to stall because the processor is waiting to access the disk.There is only one disk in the system.Assume that the OS issues one disk accesses at a time. (d) Suppose that the application runs for 100 sec when only one processor is used,how many sec would tha application requires to run on the 8-processor SMP system? (Note that the 100 sec is the wall clock time,measured from the beginning to the end of the application.) -- 張凡解答這樣寫:Suppose x is the I/O time, (100-x)/(0.5*8)=x => x=20 execution time = 20+20 = 40 sec 其實看不太懂這個式子...想請教一下各位,謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.171.44.204
privatewind:其實我覺得這題張凡 解錯了... 01/31 16:27
boy5548:那請問一下喔 你覺得這題要怎麼解? 01/31 16:28
boy5548:他和高銘解法不同... 01/31 16:29
privatewind:d 我算22.22 s, x+x= 8cpu-excution time 01/31 16:38
privatewind:x+8x= 1cpu-time =100, x=11.11 01/31 16:39
privatewind:11.11*2=22.22 01/31 16:39
zelkova:可是p大.. 有50%要stall, 所以x+8x是不是要改成x+4x? 01/31 16:54
zelkova:只是這樣答案好像跟張凡一樣@@ 01/31 16:55
privatewind:我的x是IO time 01/31 16:58
privatewind:50%要stall 這個50% 就是x佔去的時間 01/31 16:59
privatewind:他的stall time 應該就只有指 IO time 如果還要考慮 01/31 17:03
privatewind:memory stall 那不能算....因為他給的時間是wall time 01/31 17:04
zelkova:有道理 你說服我了@@ 01/31 17:06
zelkova:我也不清楚張凡算式的來龍去脈.. 01/31 17:07
privatewind:把張凡 式子去掉0.5 就是我的算法,他認為cpu time 01/31 17:11
privatewind:兩者是分開的... 01/31 17:11
privatewind:但實際上IO time 應該包含在CPU time 中 01/31 17:11
privatewind: ^^^^ CPU wall time 01/31 17:12
boy5548:p大..其實我不太懂你的算式..可以解釋一下嗎?? 謝謝 01/31 20:18
※ 編輯: boy5548 來自: 114.27.125.101 (01/31 20:19)
nypgand1:#1D81_CQa 我之前問過 也是沒結果 02/01 10:52
privatewind:cpu execution time = CPU Wall time 02/01 12:46
privatewind:簡單講就是 我的stall time = io time 02/01 12:49
privatewind:他也說了 50%的stall 是因為IO 02/01 12:49
babygoat:p大講的應該是execution time吧 張凡之前的章節有講過 02/01 16:23
babygoat:execution time= CPU_time + I/O time所以他的算法才會分 02/01 16:24
lsy77613:請問p大,為什麼(100-x)/(0.5*8)這個式子會等於x 02/01 23:58
lsy77613:不是應該等於新硬體的執行時間嗎? 02/01 23:58
sneak: 可是p大.. 有50% https://daxiv.com 09/11 14:12