作者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
1F:→ aoqq12:我会用表记Pi的i/o结束时间 +ready queue辅助 01/21 23:45
2F:→ christianSK:谢谢 01/22 08:58
3F:→ aoqq12:不过这题超烦的 ...而且才10分= = 01/22 23:11