Introduction to the Linux kernel design and implementation Note -1-linux kernel

Source: Internet
Author: User

One, the Linux kernel compared to the traditional Unix kernel comparison:

(1): Linux supports dynamic kernel modules. Although the Linux kernel is also a monolithic structure, it allows dynamic removal (rmmod xxx) and loading of kernel modules (Insmod Xxx.ko) when needed.

(2): Linux supports symmetric multi-processing (SMP) mechanisms, although many variants of UNIX also support SMP, but traditional UNIX does not support this mechanism.

(3): The Linux kernel can be preempted (preemptive). Kernel preemption is not supported in Linux 2.4 and previous versions, and is supported in Linux 2.6 and beyond.

(4): The Linux kernel does not differentiate between threads and processes. For the kernel, all processes are the same, but some of the resources are shared.

Two, the difference between the single core and the micro-core

          monomer kernel: large kernel, os monomer kernel means that all operating system functions are actually included in a large chunk of code and , with a unique address space. Most unix linxu

Microkernel : Unlike a monolithic kernel, a microkernel will only OS core features in the kernel, including IPC Communication, address space allocation, and basic scheduling , these things run in the kernel state. Such as: WinCE system. Other functions, such as device drivers, file systems, storage management, and networking, are provided as a service in a user-state process, and these user-state processes can be tailored to specific application and environmental requirements. Sometimes, these processes are also called servers.

Third, the Linux kernel version


Four, the characteristics of Linux kernel development

(1): Kernel programming cannot access C library. But most of the C library functions have been implemented in the kernel.

(2): GNU C must be used for kernel programming.

(3): Kernel programming lacks a protection mechanism like using user space

(4): Floating point is difficult to use when kernel programming

(5): The kernel has only a small fixed-length stack, the kernel stack is small, fixed length, 32-bit kernel stack is 8KB, and 64 bits is 16KB.

(6): Because the kernel supports asynchronous interrupts, preemption, and SMP, you must always be aware of synchronization and concurrency

(7): Be aware of the importance of portability


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.