In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
What is the kernel of the Linux system? aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
I believe that people who have come into contact with Linux know more or less about the kernel, so let's talk about what the Linux kernel is.
Linux is an open source computer operating system kernel. It is a Unix-like operating system written in C language and conforms to the POSIX standard.
Linux was first developed by Finland's Linus Torvalds to try to provide a free Unix-like operating system on Intel's x86 architecture. The program, which began in 1991, was assisted by a number of Minix hackers in the early days, and today countless programmers around the world are helping it for free.
The main modules (or components) of the Linux kernel are divided into the following parts: storage management, CPU and process management, file system, device management and driver, network communication, and system initialization (boot), system calls, etc.
The following is a detailed explanation for you:
One: how is the linux system constructed?
User space:User Applications and GNU C library (glibc)
Kernel space:System Call interface, Kernel and Architecture-Dependent Kernel Code .
Second: why is the linux system divided into User space and Kernel space?
CPU usually implements different working modes. Taking ARM as an example, seven working modes are implemented:
User mode (usr), system mode (sys), administrative mode (svc), interrupt mode (irq), fast interrupt mode (fiq), data access abort mode (abt), undefined instruction mode (und)
X86 also implements four different levels: Ring0-Ring3. Privileged instructions can be executed under Ring0, but there are many restrictions on Ring3. The linux system takes advantage of this feature and uses two levels to run the linux kernel and applications respectively, so that the operating system itself is fully protected. The user code runs in Ring3, and the kernel code runs in Ring0.
Kernel space and user space are two different states of program execution. The transfer from user control to kernel space can be completed through system calls and hardware interrupts.
Third, linux kernel architecture:
System Call Interface (SCI), Process Management (PM), Memory Management (MM), Arch, Virtual File System (VFS), Network Stack, Device Drivers (DD)
1: system call API SCI
The SCI layer provides a set of standard system call functions for the user space to access the linux kernel and builds a bridge from the user space to the kernel space.
2: process management
Process management focuses on creating processes (fork, exec), stopping processes (kill, exit), and controlling the communication between them (signal or POSIX mechanism). Process management also includes controlling how active processes share CPU, that is, process scheduling.
3: memory management
The main role of memory management is to control multiple processes to share memory areas safely.
4: network protocol stack
The kernel protocol stack provides rich network protocol implementation for linux.
5:Virtual File System
VFS hides the details of various file systems and provides a unified interface for file operations.
6: device driver
There is a lot of code in the linux kernel that resides in device drivers that control specific hardware devices.
To put it simply, the Linux kernel is composed of a series of programs, including interrupt service programs responsible for responding to interrupts, schedulers responsible for managing multiple processes to share processor time, memory managers responsible for managing address space, network, system service programs for inter-process communication, and so on.
This is the answer to the question about what is the kernel of the Linux system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.