When a computer system is a multi-channel program design, there are often multiple processes or threads competing for the CPU at the same time. This happens as long as two or more processes are in the ready state. If only one CPU is available, you must select the next process to run. The operating system kernel uses a higher form of exception-control flow called process switch, sometimes called context switch, to achieve multitasking, and this part of the work of completing process switching is called the Scheduler (Scheduler), The algorithm used by the program is called the Scheduling algorithm (scheduling algorithm).
The basic rules of scheduling include CPU utilization, system throughput, turnaround time, wait time, response time, and so on.
System throughput represents the number of times the CPU has completed a job per unit of time.
Turnaround time is the job completion time minus the time the job arrives.
The wait time is the sum of the time the process is waiting for the processor state, and the longer the wait time, the lower the user satisfaction.
Response time is the time it takes to submit a response from the user to the system for the first time.
Typical scheduling algorithms include: first come first service scheduling algorithm (FCFS), short job priority scheduling algorithm (SIF), priority scheduling algorithm, high response ratio scheduling algorithm, time slice rotation algorithm, multilevel feedback queue scheduling algorithm. The average waiting time and average turnaround time of short job priority scheduling algorithm are the least. The scheduling method which is advantageous to both short operation and long operation is the highest response ratio priority scheduling algorithm.
"Operating system" scheduling algorithm