Examly題庫立即開始練習
初考-統計資料處理大意1145單選題

P1, P2, P3 三個程序所需處理時間依序為 10, 5, 15 毫秒,下列那個 CPU 排程有最短的平均等待時間?

A$\mathrm{P1} \rightarrow \mathrm{P2} \rightarrow \mathrm{P3}$
B$\mathrm{P2}\rightarrow \mathrm{P1}\rightarrow \mathrm{P3}$正確答案
C$\mathrm{P3} \rightarrow \mathrm{P1} \rightarrow \mathrm{P2}$
D$\mathrm{P3} \rightarrow \mathrm{P2} \rightarrow \mathrm{P1}$
答案與詳解
B
正確答案
SJF (最短工作優先) 排程:短工作先做,平均等待時間最少。

為什麼答案是 B

P2(5)→P1(10)→P3(15):等待時間 0+5+15=20,平均 20/3≈6.67 毫秒。符合 SJF 由短到長排列,平均等待時間最短,正解。

載入中…

資料處理大意 相關題目

想練更多資料處理大意考古題?

Examly 收錄 38 萬+ 道歷屆題目,每題都有像這樣的精選詳解。免費下載,立即開練。

黑皮