The scheduling algorithm of process scheduling algorithm refers to the resource allocation algorithm according to the resource allocation strategy of the system. 1. First come first serve
1. First come first service scheduling algorithm. First come first service (FCFS) scheduling algorithm is the simplest scheduling algorithm, which can be used for both job scheduling and process scheduling. The FCFS algorithm is advantageous for long jobs (processes) and is not conducive to short jobs (processes). This algorithm is suitable for the CPU busy job, but it is not conducive to the I/O busy type of job (process).
2. Short process priority scheduling algorithm
2. Short job (process) priority scheduling algorithm. The short job (process) Priority scheduling algorithm (SJ/PF) refers to the algorithm for scheduling short or short process priorities, which can be used for job scheduling and process scheduling. However, it is unfavorable to the long-term operation; The urgency of the operation (process) is not handled in time; the length of the job is only estimated.
3. High priority priority scheduling algorithm
1. The type of priority scheduling algorithm. The highest priority priority (FPF) scheduling algorithm is introduced in order to take care of the urgency operation and get it into the system. This algorithm is often used in batch processing system, as a job scheduling algorithm, also as a variety of operating system process scheduling, can also be used in real-time systems. When it is used for job scheduling, a number of the highest priority jobs in the fallback queue are loaded into memory. When it is used for process scheduling, the processor is assigned to the highest priority process in the ready queue, at which point the algorithm can be further divided into the following two kinds:
1) Non-preemptive priority algorithm
2) Preemptive priority scheduling algorithm (high-performance computer operating system)
2. Priority type. The core of the highest priority scheduling algorithm is whether it uses static or dynamic precedence, and how to determine the priority of a process.
3. High response ratio priority scheduling algorithm
In order to compensate for the shortage of the short job priority algorithm, we introduce dynamic priority, which increases the priority level of the job with the increase of the waiting time and the rate a. The law of priority change can be described as: priority = (wait time + request service time)/request service time; = (response time)/Request service time
4. Time-slice-based rotation scheduling algorithm
1. Time slice rotation method. The time slice rotation method is generally used for process scheduling, each scheduling, the CPU allocation of the first process, and make it a time slice execution. When the time slice is run out, a clock interrupt request is made by a timer, and the process is stopped and sent to the end of the ready queue; 2. Multilevel feedback queue scheduling algorithm multilevel feedback queue scheduling algorithm without knowing the time required to execute various processes in advance, it is a well-known process scheduling algorithm. The implementation process is as follows:
1) Set up multiple ready queues and assign different priorities to each queue. The higher the priority queue, the smaller the execution time slice required for each process.
2) When a new process enters memory, it is first placed at the end of the first queue and queued for dispatch by the FCFS principle. If he can be completed in a time slice, he can evacuate; if not, go to the end of the second queue and wait for the same schedule ... So, when a long job (process) moves from the first queue to the nth queue (the last queue), it runs on the nth queue time slice.
3) only when the first queue is idle, the scheduler dispatches the processes in the second queue, and only if the 1th to (i-1) queue is empty, the process in queue I is scheduled to run and the corresponding time slice rotation is performed.
4) If the processor is processing a process in queue I and a new process enters a higher priority queue, the new queue seizes the running processor and places the running process at the end of queue I.
-
Top
-
4
Process scheduling algorithm