In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you the Linux process scheduling strategy example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
1. Under Linux, processes are divided into five categories, namely, stop class, cut-off class, real-time class, fair class and idle class.
Each category has a run queue, and each time it is scheduled, it is sorted according to the priority of the category, and then scheduled to run according to the highest priority task within each category.
File: core.c (linux-4.6\ kernel\ sched)
Interpretation: take a look at the for loop below, and you can see that the idea is to iterate through each category and select the next runnable task. Since most of the tasks are in the fair queue, in most cases, the choice is made in the fair queue, so the kernel developer added likely () to the above code to improve performance.
2. The calling order of the scheduler schedule ().
Schedule ()-- > _ _ schedule ()-> pick_next_task ()
File: core.c (linux-4.6\ kernel\ sched)
. (omitted in the middle)
The above is all the contents of the article "sample Analysis of process scheduling policies in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.