問題如下:
Suppose the Linux scheduler chooses the process with the most credits
to run, and if no runnable processes can be chosen, the recrediting
operation is performed according to the following rule for evry process
in the system:
credits = credits/2 + priority
For each time slice, currently running process will lose one credit.
When the credits reach zero, it is suspended. If the time slice is 1,
consider the arrivals of following set of processes for execution at the
times indicated. Each process is with the priority specified and will
run in the sequence of the list amount of time interleaved with CPU
and I/O burst.
| Process | Priority | Arrival Time | CPU and I/O
------------------------------------------------------------------
| P1 | 1 | 0.0 | 1CPU, 3I/O, 3CPU, 1I/O, 1CPU
------------------------------------------------------------------
| P2 | 3 | 0.5 | 2CPU, 1I/O, 1CPU, 1I/O, 2CPU
------------------------------------------------------------------
| P3 | 1 | 1.0 | 1CPU, 2I/O, 10CPU
------------------------------------------------------------------
What is the average turnaround time T?
(A)0<T<=5
(B)5<T<=10
(C)10<T<=15
(D)15<T<=20
(E)20<T<=25
請問者是要用何種排班來計算??
能否有好心人附上Gantt Chart,感激不盡
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.141.10.17