搶占式與非搶占式的對比:
非搶占式(Nonpreemptive)
讓進程運行直到結束或阻塞的調度方式
容易實現
適合專用系統,不適合通用系統
搶占式(Preemptive)
允許將邏輯上可繼續運行的在運行過程暫停的調度方式
可防止單一進程長時間獨占CPU
系統開銷大(降低途徑:硬體實現進程切換,或擴充主存以貯存大部分程式)
非搶占No preemption. No resource can be forcibly removed (強行搶占) from a process holding it.
循環
搶占與非搶占調度的相同點、不同點:(決策模式)
Nonpreemptive(非搶占)
–Once a process is in the running state, it will continue until it terminates(結束) or blocks itself for I/O(阻塞)
Preemptive (搶占)
–Currently running process may be interrupted and moved to the Ready state by the operating system(運行時可中斷)
–Allows for better service since any one process cannot monopolize the processor for very long(較好服務,避免進程獨占處理機太長時間)