[理工] [計組] 97台大資工

看板Grad-ProbAsk作者 (小YO)時間15年前 (2011/01/31 11:06), 編輯推噓3(3025)
留言28則, 7人參與, 最新討論串1/1
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

01/31 16:27, , 1F
其實我覺得這題張凡 解錯了...
01/31 16:27, 1F

01/31 16:28, , 2F
那請問一下喔 你覺得這題要怎麼解?
01/31 16:28, 2F

01/31 16:29, , 3F
他和高銘解法不同...
01/31 16:29, 3F

01/31 16:38, , 4F
d 我算22.22 s, x+x= 8cpu-excution time
01/31 16:38, 4F

01/31 16:39, , 5F
x+8x= 1cpu-time =100, x=11.11
01/31 16:39, 5F

01/31 16:39, , 6F
11.11*2=22.22
01/31 16:39, 6F

01/31 16:54, , 7F
可是p大.. 有50%要stall, 所以x+8x是不是要改成x+4x?
01/31 16:54, 7F

01/31 16:55, , 8F
只是這樣答案好像跟張凡一樣@@
01/31 16:55, 8F

01/31 16:58, , 9F
我的x是IO time
01/31 16:58, 9F

01/31 16:59, , 10F
50%要stall 這個50% 就是x佔去的時間
01/31 16:59, 10F

01/31 17:03, , 11F
他的stall time 應該就只有指 IO time 如果還要考慮
01/31 17:03, 11F

01/31 17:04, , 12F
memory stall 那不能算....因為他給的時間是wall time
01/31 17:04, 12F

01/31 17:06, , 13F
有道理 你說服我了@@
01/31 17:06, 13F

01/31 17:07, , 14F
我也不清楚張凡算式的來龍去脈..
01/31 17:07, 14F

01/31 17:11, , 15F
把張凡 式子去掉0.5 就是我的算法,他認為cpu time
01/31 17:11, 15F

01/31 17:11, , 16F
兩者是分開的...
01/31 17:11, 16F

01/31 17:11, , 17F
但實際上IO time 應該包含在CPU time 中
01/31 17:11, 17F

01/31 17:12, , 18F
^^^^ CPU wall time
01/31 17:12, 18F

01/31 20:18, , 19F
p大..其實我不太懂你的算式..可以解釋一下嗎?? 謝謝
01/31 20:18, 19F
※ 編輯: boy5548 來自: 114.27.125.101 (01/31 20:19)

02/01 10:52, , 20F
#1D81_CQa 我之前問過 也是沒結果
02/01 10:52, 20F

02/01 12:46, , 21F
cpu execution time = CPU Wall time
02/01 12:46, 21F

02/01 12:49, , 22F
簡單講就是 我的stall time = io time
02/01 12:49, 22F

02/01 12:49, , 23F
他也說了 50%的stall 是因為IO
02/01 12:49, 23F

02/01 16:23, , 24F
p大講的應該是execution time吧 張凡之前的章節有講過
02/01 16:23, 24F

02/01 16:24, , 25F
execution time= CPU_time + I/O time所以他的算法才會分
02/01 16:24, 25F

02/01 23:58, , 26F
請問p大,為什麼(100-x)/(0.5*8)這個式子會等於x
02/01 23:58, 26F

02/01 23:58, , 27F
不是應該等於新硬體的執行時間嗎?
02/01 23:58, 27F

09/11 14:12, , 28F
可是p大.. 有50% https://daxiv.com
09/11 14:12, 28F
文章代碼(AID): #1DHYSwtf (Grad-ProbAsk)