Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 5: CPU Scheduling (Scheduling Criteria (CPU utilization,…
Chapter 5: CPU Scheduling
Basic Concepts
CPU burst:star:、 I/O burst:star:
是互相交錯的
CPU Scheduler
:star: : 從ready queue當中挑選process給CPU執行
Dispatcher
:star:、
Dispatch latency
:star:
Scheduling Criteria
CPU utilization
Throughput
Turnaround time
Waiting time
Response time
Scheduling Algorithms
FCFS
SJF、SRTF
RR
Multilevel Queue
Multilevel Feedback Queue
Thread Scheduling
user-level thread
process-contention scope(PCS)
:star:
CPU爭奪發生在同一個process之內
kernel-level thread
system-contention scope(SCS)
:star:
CPU爭奪發生在整個系統內
Multi-Processor Scheduling
Symmetric multiprocessing (SMP)
兩種
每個CPU共享一條ready queue
每個CPU有自己的private queue
Multicore Processors
Multithreaded Multicore System
Multiple-Processor Scheduling
負載平衡
Load balancing
:star: : 盡量讓工作平均分配
Push migration
:star: : 若某個CPU太忙,把它的工作推出去
Pull migration
:star: : 太閒的處理器,幫忙把工作拉過來做
Processor Affinity
在multiprocessor system中。當某process已決定在某CPU上執行,則在執行過程中,就盡量不要再把它移去別的CPU了
Soft affinity
: 盡量,但不保證
Hard affinity
: 保證
Real-Time CPU Scheduling
Soft real-time systems
:star: : 有時間限制的工作,會給較高的優先權
Hard real-time systems
:star: : 排程必須保證工作可在時間內完成
Event latency
: 從事件 發生到完成
Rate Montonic Scheduling
: 用週期倒數來當優先權(period越短的優先權越高)