CPU Scheduling Algorithm
Assumption
為了簡化討論,我們有以下假設:
- 只有單一 processor,因此一次至多跑一個 process
- Scheduler 在排程前就知道每個 process 的 CPU burst time 需要多少時間
- 所有 Ready process 都在 ready queue 中乖乖排隊
Nonpreemptive Scheduling
1. First Come First Serve (FCFS) Scheduling
2. Shortest-Job-First (SJF) Scheduling
Preemptive Scheduling
1. Shortest-Remaining-Time-First (SRTF) Scheduling
可以想成 preemptive 版本的 SJF
2. Round-Robin (RR) Scheduling
Priority Scheduling
D-OS-Ch05ee-Priority_Scheduling
Proportional Share Scheduling
D-OS-Ch05ef-Proportional_Share_Scheduling