Operating system operation scheduling algorithm & evaluation index

Five classic job scheduling algorithms
1.FCFS algorithm (first come first served algorithm / longest waiting time service algorithm)
Algorithm principle: which job is submitted first to the system.
Algorithm characteristics: Non-preemptive algorithm, which is fair, the advantage is that it is easier to implement, the disadvantage is that it does not distinguish the length of the job, regardless of the priority. Can’t do urgent things, but because this is a fair algorithm, there will be no starvation.
2.SJF algorithm (short job priority algorithm)
Algorithm principle: This is a preferential algorithm for short jobs, but this is not a preemptive algorithm. Long jobs can only be run after all short jobs have been run.
Algorithm characteristics: Unacceptable to users of long jobs, which will lead to starvation of long jobs.
3.SRT algorithm (shortest remaining time first algorithm)
Algorithm principle: preemptive algorithm.
Algorithm Features: May lead to starvation.
4.HPF algorithm (high priority algorithm)
Algorithm principle: Each job specifies an integer representing the priority of the job. When a new job needs to be transferred from the input well into memory for processing, the job with the highest priority is selected first.
Algorithm characteristics: Low-priority algorithms can cause starvation. Preemptive / non-preemptive algorithms.
Static Priority: Determined when the process is created and remains unchanged throughout the run.
Dynamic priority: The priority given to a process can change as the process advances or as its waiting time increases
5.HRF algorithm (high response ratio priority algorithm)
Algorithm principle: non-preemptive algorithm, the response ratio is equal to 1 + wait time / service time≈wait time / service time. The response ratio is higher for job scheduling.
Algorithm features: Does not cause starvation.

Algorithm evaluation indicators (five reference indicators)
在这里插入图片描述

发布了13 篇原创文章 · 获赞 2 · 访问量 1050

猜你喜欢

转载自blog.csdn.net/weixin_44033021/article/details/104033573