Single processor scheduling algorithm learning

xiaoxiao2021-03-06  17

Recently understand the operating system, understand some of the methods of CPU scheduling. Measure a few guidelines for a CPU scheduling algorithm: CPU usage throughput (number of processes in unit time) turn-turn time (process from submit to the time) waiting time (time waiting for the time in the ready queue) response Time (from submit to the first response time interval)

There are currently 6 algorithms currently learned:

FIFS: First come first served, that is, queue. However, this algorithm is easily caused by throughput and waiting time, and the response time is growing, and it can be known from mathematical common sense. However, this algorithm is more common in the early computer system. This algorithm belongs to the non-seizuated algorithm

SJF: The shortest job priority schedule, the process takes time if short is scheduled. This guarantees that the response time of most processes has a large throughput, and there is a problem with how to get down the CPU interval length. The system is usually used is the average of the process CPU time length in the computer system. This algorithm can be a preemptive or non-seizure.

PSA: Priority adjustment. Give priority to each process, then schedule according to priority, the same priority process can use the FIFS or SJF. The priority adjustment can be a preemptive or non-grab size. When the current process is limited, the priority of the process can be steal or keep the original thread execution. However, the priority scheduling algorithm is easily hungry, that is, infinite blocking. The priority process may have been stepped by the process than its high process steals (usually in a heavy-duty computer system) solution can adopt aging, that is, with time, the priority of the waiting thread is gradually rise.

RR: Rotation method, this algorithm is mainly designed for the time-time system (using a time film technology). The system divides the CPU into the time film to first serve first. This algorithm performance is mainly due to the length of time tablets. If the time slice is very long, it degrades into a FIFS. If it is very short to 1, then since theore is that n process has its own processor, the speed is 1 / n. However, since each instruction is used to use memory, this N processor is not more slower than n true. But there is a problem that the context switching time is to be controlled. Experience has shown that 80% of the CPU interval should be less than time slice.

MQSA: Multi-level queue The scheduling algorithm is FIFS to be improved, dividing threads into several different types of processes. If the system process, the user process, first extract the process in the system process and then execute the user process and execute the system process queue. In addition, RR algorithms can also be used in each queue.

MFQS multi-level feedback queue scheduling. Inherited in MQSA but there is a dynamic adjustment, MFQS uses time tablet technology, if the highest priority queue is given to a time film, the process is adjusted down to lower its priority, but in the tetrared column It is time to point according to the time slice, the shorter the time slice, the higher the next level, the time, the time, the longer period of time. This algorithm is generally used most complicated

转载请注明原文地址:https://www.9cbs.com/read-42164.html

New Post(0)