what does linux kernel mean

藏色散人
藏色散人Original
2019-01-14 10:48:1816208browse

The Linux kernel is the lowest level of easily replaceable software that interfaces with the hardware in a computer; the kernel is responsible for connecting all applications running in "user mode" to the physical hardware and allows processes to use inter-process communication to connect from Get information from each other.

what does linux kernel mean

#The operating environment of this article: linux5.9.8 system, Dell G3 computer.

With more than 13 million lines of code, the Linux kernel is one of the largest open source projects in the world.

So what is the kernel?

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

Different Types of Kernels

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

Monolithic Kernels

Monolithic kernels are the opposite of microkernels in that they contain not only the CPU, memory and IPC, but also device drivers, file system management and system Server calls, etc. Monolithic cores 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 having to wait in a queue for a task to complete. However, this can cause problems because the more things are run in hypervisor mode, the more things can crash if one misbehaves.

Advantages

More direct access to the program's hardware

Communication between processes Easier to communicate with each other

If your No additional installation is required if the device is supported Large area

Large memory usage

Not very safe because everything runs in administrator mode

Linux kernel files Where?

what does linux kernel mean

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

When virtual memory was developed to enable easier multitasking capabilities, "vm" was put in front of the file to show that the kernel supported virtual memory. For a while 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, often LZMA or BZIP2 is used instead, some kernels simply call it zImage.

The version number will be in ABCD format, AB may be 2.6, C is your version, D represents your patch or hotfix what does linux kernel mean

in /boot There are other very important files in the 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 files. The system.map file is used for memory management before the kernel is fully loaded, and the configuration file tells the kernel what options and modules to load into the kernel image when compiling the kernel.

Linux Kernel Architecture

what does linux kernel meanSince the Linux kernel is a monolithic kernel, it has the largest footprint and greatest complexity compared to other types of kernels. This was a design feature that caused considerable debate in the early days of Linux, and still suffers from some of the same design flaws inherent in monolithic kernels.

One thing Linux kernel developers have done to address these flaws is to make kernel modules that can be loaded and unloaded at runtime, meaning you can add or remove functionality from the kernel on the fly. This is not just about adding hardware capabilities to the kernel by including modules that run server processes (such as low-level virtualization), but it can also replace the entire kernel without the need to reboot the computer in some cases.

Imagine if you could upgrade to a Windows Service Pack without rebooting...

Kernel Modules

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

Modules typically add functionality to the base kernel, such as devices, file systems, and system calls. LKMs have the file extension .ko and are usually stored in the /lib/modules directory. Due to their modular nature, you can easily customize the kernel by setting which modules to load or not load using the menuconfig command during boot or by editing the /boot/config file, or you can dynamically load and unload modules using the modprobe command .

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 of the module is not available. The developers of the software (i.e. nVidia, ATI, etc.) do not provide the source code, but instead build their own modules and compile the required .ko files for distribution. While these modules are free in beer, they are not as free as they are in voice, so some distributions do not include these modules because the maintainers believe it "taints" the kernel by providing non-free software.

The kernel is not magic, but it is essential for any properly functioning computer. The Linux kernel is different from OS X and Windows in that it contains kernel-level drivers and supports many things "out of the box". Hopefully you'll learn more about how your software and hardware work together and the files you need to start your computer.

The above is the detailed content of what does linux kernel mean. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What does apache mean?Next article:What does apache mean?