Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does the linux kernel mean?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you what the linux kernel means. I hope you will gain a lot after reading this article. Let's discuss it together.

So what is the kernel?

The kernel is the lowest level of easily replaceable software that interfaces with the hardware in the computer. It is responsible for connecting all applications running in "user mode" to physical hardware and allowing processes (called servers) to obtain information from each other using interprocess communication (IPC).

Different types of kernel

Of course, when building a kernel from scratch, there are different ways to build the kernel and architectural considerations. In general, most kernels belong to one of three types: monolithic, microkernel, and hybrid. Linux is a monolithic kernel, while OS X (XNU) and Windows 7 use a hybrid kernel.

Monolithic kernel

Monolithic kernels are the opposite of microkernels because they contain not only CPU, memory and IPC, but also device drivers, file system management, and system server calls. Monolithic kernels tend to be better at accessing hardware and multitasking, because if a program needs to get information from memory or another process running it has a more direct line to access it, instead of waiting in the queue to complete the task. However, this can lead to problems, because the more things run in hypervisor mode, the more things run in hypervisor mode, and the abnormal behavior of one can cause the system to crash.

Advantages

More direct access to the program's hardware

Communication between processes makes it easier to communicate with each other

If your device is supported, no additional installation is required to use it

Processes react faster because there is no processor time queue

Shortcoming

Installation covers a large area

Large memory footprint

It's not safe because everything runs in administrator mode.

Where is the Linux kernel file?

The kernel files in Ubuntu are stored in the / boot folder, named vmlinuz- version. The name vmlinuz comes from the unix world, and they used to call their kernel "unix" in the 1960s, so Linux started calling their kernel "linux" when it was first developed in the 1990s.

When developing virtual memory for easier multitasking, "vm" is placed in front of the file to show that the kernel supports virtual memory. There was a time when the Linux kernel was called vmlinux, but the kernel became too large to fit in the available boot memory, so the kernel image was compressed and the ending x was changed to az to show that it was compressed using zlib compression. This compression is not always used and is usually replaced by LZMA or BZIP2, and some kernels are referred to as zImage for short.

The version number will be in ABCD format, AB may be 2.6 and C is your version, and D represents your patch or patch

There are other very important files in the / boot folder, named initrd.img-version,system.map-version and config-version. The initrd file is used as a small RAM disk to extract and execute the actual kernel file. The system.map file is used for memory management before the kernel is fully loaded, and the configuration file tells the kernel the options and modules to load into the kernel image when compiling the kernel.

Linux kernel architecture

Because the Linux kernel is a monolithic kernel, it has the largest footprint and complexity compared with other types of kernels. This is a design feature that caused considerable controversy in the early stages of Linux, and still has some of the same design flaws inherent in monolithic kernels.

One of the things Linux kernel developers do to solve these defects is to make kernel modules that can be loaded and unloaded at run time, which means that you can add or remove kernel functions dynamically. This not only adds hardware functionality to the kernel by including modules that run server processes, such as low-level virtualization, but also replaces the entire kernel without the need to restart the computer in some cases.

Imagine if you could upgrade to a Windows service pack without having to restart.

Kernel module

What if Windows already has all the available drivers installed and you only need to open the drivers you need? This is basically what the kernel module does for Linux. Kernel modules, also known as loadable kernel modules (LKM), are critical to keeping the kernel running with all hardware without consuming all available memory.

Modules usually add functions to the basic kernel, such as devices, file systems, and system calls. LKM has a file extension of .ko and is usually stored in the / lib / modules directory. Because of their modular nature, you can easily customize the kernel by using the menuconfig command or by editing the / boot / config file to set modules to load or not during startup, or you can use modprobe to dynamically load and unload module commands.

Third-party and closed-source modules are available in some distributions, such as Ubuntu, and may not be installed by default because the source code for the module is not available. The developers of the software (i.e. nVidia,ATI, etc.) do not provide the source code, but build their own modules and compile the required .ko files for distribution. Although these modules are free in beer, they are not as free as in voice, so some distributions do not include these modules because maintainers believe that they "tarnish" the kernel by providing non-free software.

The kernel is not magic, but it is essential for any running computer. The Linux kernel is different from OS X and Windows because it contains kernel-level drivers and supports a lot of things "out of the box". I hope you can.

After reading this article, I believe you have a certain understanding of what the linux kernel means. You want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report