Proportional Share Scheduling

Concept

Scheduler 保證每個 job 獲得某個百分比的 CPU time

Strategy

所有 process 共享 個 shares。當某個 process 被 OS 分配到 個 shares 時,它就會獲得 的總 processor 時間

Implementation

1. Lottery Scheduling

每次 scheduler 透過抽籤來決定下一個運行的 process,而那些分配到更多 share 應該運行得更明礬的 process 會獲得更多的抽獎票卷。隨著時間推移,各個 process 的執行時間會趨近於它們的 share 比例

2. Completely Fair Scheduling (CFS)

D-OS-Ch05ia-Completely_Fair_Scheduling

CFS 是 Linux v2.5 後對於 non-real-time scheduling 用的 scheduling scheme