[理工] OS: CPU utilization和response time衝突

看板Grad-ProbAsk作者 (Clonsey)時間7年前 (2017/04/14 22:38), 編輯推噓3(306)
留言9則, 5人參與, 最新討論串1/1
Discuss how the following pairs of scheduling criteria conflict in certain settings. (a) CPU utilization and response time 官方解答說: "CPU utilization is increased if the overheads associatedwith context switching isminimized. The context switching overheads could be lowered by performing context switches infrequently. This could, however, result in increasing the response time for processes." 我知道context switch減少,CPU utilization會上升; 但不懂為何context switch減少會導致response time變長? context switch減少,resonse time不是也會減少嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.163.181.189 ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1492180686.A.28D.html

04/14 22:49, , 1F
"performing context switches infrequently"
04/14 22:49, 1F

04/14 22:49, , 2F
當然別人輪到的時間就久了
04/14 22:49, 2F

04/15 12:09, , 3F
假設P1,P2,P3同時到,1ms跟2ms做一次context switching
04/15 12:09, 3F

04/15 12:09, , 4F
當然後者的utilization高,但response time長囉
04/15 12:09, 4F

04/15 12:11, , 5F
你可能以為是降低context swithing的時間吧
04/15 12:11, 5F

04/15 12:12, , 6F
但是題目假設context switching時間一樣,只討論頻率
04/15 12:12, 6F

04/15 16:42, , 7F
先搞清楚response time的定義
04/15 16:42, 7F

04/16 10:57, , 8F
K大必推
04/16 10:57, 8F

04/16 16:22, , 9F
謝謝大家的解釋!
04/16 16:22, 9F
文章代碼(AID): #1OyDxEAD (Grad-ProbAsk)