Summary ch6
Aim of scheduling: Assign processes to be executed by the processor(s)
-Response time
-Throughput
-Processor efficiency
Schduling Criteria:
User-oriented:
-Response Time: Elapsed time between the submission of a request until there is an output
-Turnaround Time: The time between the submission and the completion of a process
System-oriented:
-Effective and efficient utilization of the processor
Two modes:
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
First-Come-First-Served
Disadvantage: A short process may have to wait a very long time before it can execute
Favors CPU-bound processes
-I/O processes have to wait until CPU-bound process completes
-Low utilization for I/O devices
-Possibly low utilization for processor
Round Robin
-Clock interrupt is generated at periodic intervals
-When an interrupt occurs, the currently running process is placed in the ready queue,next ready process is selected
-Known as time slicing
Favors CPU-bound processes
-CPU-bound process gets more CPU time
-I/O process has to wait for CPU-bound processes to consume their quanta before its turn of executing on the CPU
Time quantum:
-The time interval between two clock interrupts
-The maximum time allocated to a process’s execution in each turn
Shortest Process Next
-Process with shortest expected processing time is selected next
-Short process jumps ahead of longer processes
-Nonpreemptive policy
Shortest Remaining Time
Preemptive version of shortest process next policy
Highest Response Ratio Next
Last updated
Was this helpful?