Linux and Security "Linux kernel Design and implementation" chapter--20135227 Huang

Source: Internet
Author: User

"Linux kernel Design and implementation" Chapter I.

Chapter One introduction to the Linux kernel:

1.3   Introduction to operating systems and kernels

Operating System: The system contains the operating system and all the applications running on it. An operating system is the part of the system that is responsible for completing the most basic functions and systems management. These sections include kernels, device drivers, boot-to-Program, command-line shell, or other kinds of user interfaces, and basic file management system tools.

kernel: If the user interface is an external image of the operating system, then the kernel is the inner core of the operating system.

kernel space: the System State and the protected memory space.

The composition of the kernel:

1. Interrupt Service Program (response interrupted)

2. Scheduler (time to manage multiple processes sharing processors)

3. Memory management Program (management process address space)

4. System service Program (network, interprocess communication)

How the application process communicates with the kernel:

By the way the system is called. The application process calls the library function, then the function library through the system call interface, let the kernel complete various tasks. (The application is trapped in the kernel via the system call interface)

The kernel is responsible for managing the system's hardware devices:

premise: Hardware devices meet the system communication, the first to issue an asynchronous interrupt signal to interrupt the execution of the processor (kernel execution).

Interrupt Service is the responsibility of the kernel. However, it is important to note that the interrupt service runs in a specialized interrupt context that is unrelated to all processes.

1.4Linux  comparison between the kernel and the traditional UNIX kernel

Unix Kernel Features: an indivisible static executable library. (The hardware system provides a page mechanism for the MMU to manage memory.) )

Linux kernel design (mainly discusses the system supporting MMU)

Single Core:

The biggest feature is that the kernel can call functions directly, and all processes are in the kernel state. It is completed as a single large process in its entirety and also runs in a separate address space.

Micro-Kernel:

Functions are divided into multiple independent processes, each of which is called a server. There are two types of privileged mode and user mode, which run independently in the respective address space. IPC communication mechanisms are used among processes.

Linux Kernel and Unix the significant difference:

Supports dynamic loading of kernel modules

Supports symmetric multi-processing mechanism SMP

Can preempt

Do not differentiate between threads and general processes

Provides object-oriented device models with device classes, hot-pluggable events, and device file systems for user space

The essence of freedom is to abandon some of Unix's poor features.

1.5Linux   Version number

For example 2. 6. 26.1(second, from the version number to determine whether the kernel is stable or development status.) Steady state for even numbers)

2: Major Version number

6: Sub-version number (from version number)

26: Revision number

1: Stable version number

Summarize:

Although the kernel is made up of processes, it differs from ordinary application processes. Kernel (System State, enter kernel space execution, run in process context), application process (user state, go into user space execution, run in kernel space). The processor runs at any time in one of the following three states: Runs in user space, executes user processes, runs in kernel space, is in the process context, executes on kernel processes, runs in kernel space, is in an interrupt context, and handles interrupts. Such as:

The kernel of Linux is a single kernel. (But Linux absorbs the essence of microkernel, which is a modular, multi-threaded, operating system that the kernel itself can dispatch.) )

Linux and Security "Linux kernel Design and implementation" chapter--20135227 Huang

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.