Linux Kernel knowledge point (1)

Source: Internet
Author: User

 

 

1. Applications run through system calls and kernel communication. Applications usually call database functions (c-database functions), and then the database functions perform various tasks on behalf of the kernel through the system call interface.

 

2. kernel architecture

 

System Call interface, process management, memory management, system structure-related code, device driver, network protocol stack, Virtual File System

 

3. the kernel space and the user space are two different states of program execution. The transition from the user space to the kernel space can be completed through system calls and hardware interruptions.

 

4. the linux architecture consists of two parts: kernel space and user space. The user space includes user programs and c libraries;

 

The kernel space contains the kernel, system calling interface, and architecture-related code.

 

5. the interrupt context is used to ensure that the interrupt service program can respond to and process the interrupt request immediately, and then exit quickly.

 

6. The processor has one of the following three active time points:

 

The running and kernel space are in the process context and represent the execution of a specific process.

 

It runs in the kernel space and is in the interrupt context. It is irrelevant to any process and processes a specific interrupt.

 

Run in user space to execute user processes.

 

7. Comparison of single kernel and micro kernel (Linux kernel runs in a separate kernel address space)

 

Single Kernel: it is implemented as a separate large process and runs in a separate address space at the same time. The communication between kernels is insignificant. They all run in the kernel state and are in the same address space. The kernel can directly call functions.

 

The features of the microkernel are divided into independent processes, each of which is called a server. All servers run independently and concurrently in their respective address spaces and cannot directly call functions. The message transmission mechanism must be used to process microkernel communication. Each server transmits messages to each other through the inter-process communication mechanism, swap "services" to avoid the failure of one server and the disaster of another.

 

Half of the kernel source code is installed in the/usr/src/linux directory.

 

You cannot use floating point operations in the kernel.

 

The kernel requires concurrent access to shared data, which requires a synchronous mechanism to ensure no competition

From: LX heaven

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.