作者christianSK (AG)
看板Grad-ProbAsk
標題[理工] [os] 96交大os
時間Fri Jan 21 21:35:19 2011
問答第一題
Each process will run in the sequence of the listed amount of time interleaved
with CPU and I/O burst in the following table:
------------------------------------------------------------------
| process | arrival time | priority | CPU,I/O burst sequence | c:cpu, i:I/O
------------------------------------------------------------------ |
| P1 | 0 | 3 | 1(c),3(i),3(c),1(i),2(c)| |
------------------------------------------------------------------ |
| P2 | 3 | 2 | 2(c),1(i),1(c),1(i),1(c)| <-----|
------------------------------------------------------------------
| P3 | 2 | 1 | 1(c),2(i),6(c) |
------------------------------------------------------------------
| P4 | 1 | 4 | 2(c),1(i),2(c),1(i),1(c)|
------------------------------------------------------------------
please consider the round-robin scheduling algorithm with different time
quanta. the context-switch time is 10 percent of the 1 time unit. please
calcuate the average turnaround time with the context-switch overhead in the
time quanta of 1,2,3,4 and 5 respectively. assume the process with the highest
priority will be choosen if several processes can be scheduled for running.
題目有點長...
我想請問大家怎麼想這種類型的排班呢??
是多畫waiting queue 和 ready queue來看嗎?
希望大家能提供一點想法給我, 每次算到一半就亂掉... = =
謝謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.243.148.121
→ aoqq12:我會用表記Pi的i/o結束時間 +ready queue輔助 01/21 23:45
→ christianSK:謝謝 01/22 08:58
→ aoqq12:不過這題超煩的 ...而且才10分= = 01/22 23:11