Linux Kernel startup Optimization

Source: Internet
Author: User


Linux Kernel startup takes a lot of time, which cannot be avoided. If you know linuxbios, you may know that linuxbios is faster than other bios, because it handed over the hardware detection task to the Linux kernel rather than the bios, after all, it is a waste of re-detection after the BIOS detects the kernel. For the sake of BIOS performance, is it irresponsible to push work to the kernel? Actually not. In fact, the most time-consuming operation during startup is hardware detection and initialization. It is precisely because of this that linuxbios has avoided such an arduous task and gave it to the operating system kernel.

Who can the kernel perform these tasks? It must be resolved by itself, because it is the foundation. To speed up the startup, the Linux designer handed over the hardware detection and initialization tasks to many kernel threads, when a kernel thread detects and initializes a Hardware Wait, it can detect and initialize another hardware, and perform parallel operations, which will be better on multiple CPU machines. According to the Linux tradition, everything is a process. At least you have to make the task a process. During kernel initialization, the kernel maintains two linked lists, one of which is the pending linked list, one is the running linked list. You don't need to worry about adding the hardware-related functions for pie initialization to the pending linked list. The powerful process scheduling mechanism of Linux will well process the execution of many hardware-initialized kernel threads, in addition, after the kernel Initialization is complete, the Mechanism interfaces of these kernel threads will be retained for a long time. Once tedious tasks require concurrent execution, they can still be completed using the kernel thread initialized by hardware detection, this mechanism is flexible.

What I don't know is, why can't we use a more unified work queue? Is the concurrency of the work queue poor?

 

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.