Introduction to the Linux Kernel

Source: Internet
Author: User
Keywords linux linux kernel linux kernel introduction
The best knowledge points to understand the Linux kernel:

Understand C language
Understand a little knowledge of operating systems
Familiar with a few related algorithms
Understand computer architecture


Features of the Linux kernel:

Combining some basic concepts of unix operating system



Tasks of the Linux kernel:

1. From a technical perspective, the kernel is an intermediate layer between hardware and software. The function is to pass the request of the application layer sequence to the hardware, and act as the underlying driver, addressing various devices and components in the system.
2. From the application level, the application has no connection with the hardware, but only with the kernel, which is the lowest level in the hierarchy that the application knows. In actual work, the kernel abstracts the relevant details.
3. The kernel is a resource management program. Responsible for allocating available shared resources (CPU time, disk space, network connection, etc.) to each system process.

4. The kernel is like a library, providing a set of system-oriented commands. System calls are just like calling ordinary functions to applications.



Kernel implementation strategy:

1. Microkernel. The most basic functions are implemented by the central kernel (microkernel). All other functions are entrusted to some independent processes, which communicate with the central kernel through a clearly defined communication interface.

2. Macro kernel. All code of the kernel, including subsystems (such as memory management, file management, and device drivers) are packaged into one file. Every function in the kernel can access all other parts of the kernel. Currently supports dynamic loading and unloading (cutting) of modules. The Linux kernel is implemented based on this strategy.



The components of the kernel:

1. User space (in detail in the "Address Space and Privilege Level" section):
application:
C library


2. Kernel space
Core kernel
Device driver

Hardware


Where are the kernel mechanisms used?

1. The communication between processes (the address space is allocated in the virtual memory of the cpu, and the address space of each process is completely independent; the number of processes executed at the same time does not exceed the number of cpu) communication requires the use of a specific kernel mechanism.
2. Inter-process switching (the number of processes executing at the same time does not exceed the number of CPUs), and the kernel mechanism is also needed.
    Process switching also needs to save the state like FreeRTOS task switching, and put the process in an idle state/recovery state.

3. Process scheduling. Confirm which process is running for how long.
Related Article

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.