Linux operating system overview

zhaozj2021-02-17  97

1 Overview

For the basic overview of the Linux operating system, see http://shanyou.sti.gd.cn/linux/linuxjc.htm

2, architectural overview

The Linux operating system is layered according to GARLAN and SHAW: the Linux operating system is divided into 4 layers, namely four subsystems, are user processes, system call interfaces, Linux kernels, hardware controllers. The following is a brief introduction to these four components.

User Process: User Application is a huge software and core running the highest level of Linux operating system. When a user program is running over the operating system, it is a process of the operating system. The computer is different, the set size of the program will vary. System call interface: In order to implement a specific task in the application, you can call the specific procedure in the operating system kernel through system call to achieve a specific service. It is generally believed that some of these calls and service industries, within, internal and programmed interfaces are also this part. The system call itself is also composed of several instructions, but the general process is different: the system call runs in kernel mode, and the general process runs in user mode. Linux kernel: The soul of the kernel operating system, including the internal nuclear abstraction of the hardware resource (such as CPU), which is responsible for managing files, memory, responsible for launching the system and running the program, responsible for receiving and transmitting packets from the network. Wait hardware: This subsystem includes all possible physical devices required for Linux installation.

3, Linux kernel

From a programmer's point of view, the kernel of the operating system provides a virtual machine interface. It abstracts many hardware details, and the program can perform data management in a unified manner, and the kernel abstracts all hardware into a unified virtual excuse.

Linux supports multitasking in a unified manner, and this way is transparent to the user process, and each process runs like only one process runs on the computer, exclusive memory and other hardware resources. In fact, the kernel runs several processes. And allow several processes to use hardware resources fairly and reasonably, which can also cause all processes without interference. Read here You will understand why Linux will not die in Windows, blue screen. Linux If you use a graphical interface, you may find that your computer seems to be dead, it's not dead, but a process died, it may be your KDE, gnome. Kill this process can do not have RESET.

The Linux kernel must also complete the tasks that the general operating system must complete:

Manage the reading and writing of the file system, map the operation of the file system into the operation of the disk or other block devices, the Linux system defines all the devices as a file, haha, this can be different from Windows. The operation of the management program, allocates resources, and the communication between the handler. Manage the memory to allocate memory for the program, and manage the virtual memory management input and output, map the device into files. Management Network: Linux, known as "network", management of networks, is her strength. Using Linux, you will feel the power of its network function, you can use Linux to simulate powerful CSICO advanced routers, the feeling is really great, as long as hundreds of dollars buy a 486 computer, you can be on it. Constructing a powerful router, is a temporary, haha, but the router performance of the software is definitely not the hardware router.

The kernel must include a virtual file system (VFS) manager and a variety of specific file systems mapped into VFS. This is a brief part of Linux, which is why Linux supported file system (MiniX file system, EXT2 / EXT3 file system, MSDoS / VFAT / NTFS file system, standard file system for ISO9600CD-ROM, HPFS OS / 2) Many reasons for file systems, UFS / SYSV file systems. For memory management, Linux uses virtual storage management mode, using modern processor's page mapping capabilities, Linux uses 4GB address space, and the operating system processing is supported by physical storage into virtual memory. . All memory (physical memory and virtual memory) is divided into a size equal, and the system is accessible to a memory address by giving out the page number and page offset. When physical memory is tight, the operating system moves some unused pages from memory to the hard disk to use the idle page for use, this process is called swap (swap) .Linux uses the exchange partition to handle the virtual storage required for exchange Space, open a separate partition on the hard disk specifically for mapping virtual memory, switching partitions can have multiple, because early Linux core requires no more than 128MB of each exchange partition. For more heavy load, exchange Memory uses 256MB or even more normal things, so the system there is often a plurality of swap partitions. This restriction has been removed. Another task of the kernel is to execute the user program, and the core must support the executable format for this. LINUX uses a variety of executable files, such as ELF, AOUT, etc., this can be different from Windows, there is no way to distinguish a file from the name of a file, the core is only concerned about the specific form of binary files.

Linux kernel consists of five major subsystems: Process Scheduling, Memory Management (MM), Virtual File System (VFS), Network Interface (NET), Inter-Processed Communication (IPC). The process schedule is at the core position, and all subsystems are dependent on it because each subsystem needs to hang or recover the process. In general, it will be suspended when a process waits for the hardware operation to complete; when the operation is really completed, the process resumes execution. The dependencies between each subsystem are as follows:

The relationship between process scheduling and memory management: These two subsystems are dependent on each other. In a multi-channel program environment, the program runs must create a process, and the first thing to create a process is to load the program and data into memory. The relationship between communication and memory management of processes: Inter-process communication subsystems To rely on memory management support sharing memory communication mechanism. This mechanism takes more than two processes in addition to their own private memory, and can also access a common memory area. The relationship between the virtual file system and the network interface: Virtual file system uses network interface to support network file system (NFS), and the relationship between RAMDisk device memory management and virtual file system is used: Memory Management uses virtual file system support Exchange, the switching process regularly scheduled schedule.

转载请注明原文地址:https://www.9cbs.com/read-31307.html

New Post(0)