Differences between Linux applications and Kernel Modules

Source: Internet
Author: User
Article Title: differences between Linux system applications and Kernel Modules. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. the application executes a single task from start to end. The module only registers itself in advance to serve a future request. The init_module function (module entry) the task is to prepare for calling the module functions in advance. The cleanup_module function (the second entry of the module) is called when the module is detached.

2. an application can call undefined functions, because external references can be parsed during the connection process to use the appropriate function library. A module is only connected to the kernel, therefore, it can only call functions with kernel Export (such as printk) without any accessible libraries.

3. segment errors during application development are harmless and can always be tracked by the debugger to locate issues in the source code. An error in the kernel module is fatal even if it is not correct to the entire system, or at least cause a fatal error to the current process.

4. Applications run in user space. The processor prohibits direct access to hardware and unauthorized access to memory. The kernel module runs in the kernel space and can perform all operations.

5. Generally, applications do not have to worry about changing their runtime environment due to other situations. For kernel module programming, the handling of concurrency issues must be considered.

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.