History of Linux kernel Scheduler: O (N)-> O (1)-> O (log (n ))

Source: Internet
Author: User

The scheduler at the beginning is the start scheduling algorithm with the complexity of O (N) (In fact, every time all tasks are traversed, the complexity is O (n )), the disadvantage of this algorithm is that the scheduler itself takes a lot of time when there are many tasks in the kernel. Therefore, the famous O (1) scheduler was introduced from linux2.5, therefore, the scheduling algorithm is used in many documents and tutorials on the Internet.

However, Linux is a super kernel developed from the intelligence of many programmers around the world. It is not the best, but only better. In O (1) after several days, the scheduler was replaced by another better scheduler, the CFS scheduler completely fair scheduler. This is also introduced in the 2.6 kernel, specifically 2.6.23. Starting from this version, the kernel uses CFS as its default scheduler, and the O (1) scheduler is discarded.

Therefore, we have reason to believe that, if a better scheduler will appear in the future, CFS will not be spared. Because we only need the best Linux.

CFS currently has too few Chinese documents in China. It is estimated that the main reason is that the famous Linux-related classics are basically complete, these books are mostly written based on the 2.4 or 2.6 kernel. At that time, CFS was not introduced, so there is no relevant information. In addition, it may take at least three years for Overseas English documents to be published in China after translation. At that time, daylily became cold.

CFS information:

Http://www.ibm.com/developerworks/cn/linux/l-completely-fair-scheduler/index.html? CA = drs-cn-0125

In addition, sched-design-cfs.txt is also described in the internal audit document.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.