Home  >  Article  >  Operation and Maintenance  >  What are the subsystems not included in Linux kernel management?

What are the subsystems not included in Linux kernel management?

青灯夜游
青灯夜游Original
2023-02-16 11:26:282856browse

The subsystem not included in Linux kernel management is the "hardware management system". Computer hardware mainly includes memory, central processing unit (CPU), input/output (I/O) devices and hard disks. In Linux, hardware must be managed by different subsystems according to different types, such as CPU It belongs to the scope of the CPU management system, the memory belongs to the memory management system, and the graphics card belongs to the device management system.

What are the subsystems not included in Linux kernel management?

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

The subsystems mainly managed by the Linxu kernel are divided into:

(1) CPU management system: sometimes also called the process management system, its main function is to rationalize Control the CPU running time. Linux uses time-sharing to ensure that all processes can be executed. The order and priority of program execution can also be set, and specified tasks can be executed under specified times and conditions.

(2) Memory management system: Sometimes also called storage management system, it mainly manages the use of memory. Linux uses virtual storage technology, which can use hard disk space to expand memory. When the program is first executed, only virtual memory space is allocated for it. Only when the program segments and data that must be used are executed, the physical memory is transferred.

(3) File management system: mainly manages the method, location and space size of file storage. Linux uses virtual file system technology and can use a variety of file systems.

(4) Equipment management system: mainly manages external equipment. Linux divides all devices into three categories according to the characteristics of data exchange: character devices, block devices and network devices.

The subsystem not included in Linux kernel management is the "hardware management system".

The computer hardware mainly includes memory (RAM), central processing unit (CPU), input/output (I/O) devices and hard disk (Hard Disk), all of which are composed of the Linux kernel (Kernel) to manage.

Therefore, hardware must belong to different subsystem management according to different types. For example, the CPU belongs to the CPU management system, the memory belongs to the memory management system, and the graphics card belongs to the device management system.

The operating system allows the computer hardware to work accurately. It can be said that the operating system is the kernel and the interface tools it provides. The relationship between them is shown in the figure below.

What are the subsystems not included in Linux kernel management?

##Linux Hardware Resource Management

View system PCI devices

lspci is used to list all PCI devices, such as motherboards, sound cards, graphics cards and network cards, etc. It will also display USB interface devices. The syntax format is:

lspci [Parameter]

Basic display mode:

##Parameter -mm-tDisplay options:
Function
Generate machine-readable output (a single -m indicates obsolete format)
Display bus tree

Parameters-v-k-x-xxx -xxxx-b-D-P-PPResolve the device ID into a name:
Function
Redundancy (-vv or -vvv for higher redundancy)
Display the kernel driver handling each device
Display a hex dump of the standard portion of the configuration space
Shows a hex dump of the entire configuration space (dangerous; root only)
Display hex dump of 4096 bytes extended configuration space (root only)
Bus Center View ( Address and IRQ seen by the bus)
Always display domain name
In addition to the bus and device numbers, the bridge path is also displayed
In addition to the bus and device numbers, the bus path is also displayed

Parameters-n-nn-q-qq-Q

Device selection:

Function
Display numeric ID
Display text and numeric ID (name and number)
Query the unknown ID in the PCI ID database through DNS
Same as above , but re-query the locally cached entries
Query all IDs in the PCI ID database via DNS
Parameters Function
-s[ [[[]:]]:][][.[]] Show only devices in selected slots
-d[]:[] [:] Show only devices with specified ID

Other options:

Parameters Function
-i Use the specified ID database instead of /usr/share/hwdata/pci. ids
-p looks for kernel modules in the given file instead of the default mode.pcimap
-M Enable "Bus Mapping" mode (dangerous; root only)

PCI Access Options:

Parameters Function
-A Use the specified PCI access method (for a list, see "- A help")
-O= Set PCI access parameters (see "-O help" for a list)
-G Enable PCI access debugging
-H> Use direct hardware access (=1 or 2)
-F Read PCI configuration dump from the given file

example:

lspci

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)    # 集成主板设备的类型
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)
00:0f.0 VGA compatible controller: VMware SVGA II Adapter    # VGA 显卡设备
00:1b.0 Class 0403: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)    # Intel 声卡设备。
00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)
00:11.0 PCI bridge: VMware PCI bridge (rev 02)
00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)
00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)
......省略部分内容
02:00.0 USB controller: VMware USB1.1 UHCI Controller    # USB 接口设备
02:01.0 USB controller: VMware USB2 EHCI Controller
02:02.0 SATA controller: VMware SATA AHCI controller    # SATA 控制器,表明系统是 SATA 系列硬盘
03:00.0 Ethernet controller: VMware VMXNET3 Ethernet Controller (rev 01)    # 百兆网卡设备

View CPU information

There is a corresponding relationship between siblings and cpu cores values. If siblings is twice the cpu cores, It means that the system supports hyper-threading and hyper-threading is turned on; if the siblings and cpu cores are consistent, it means that the system does not support hyper-threading or hyper-threading is not turned on

cat /proc/cpuinfo

processor       : 0    # 逻辑处理器的唯一标识符
vendor_id       : GenuineIntel    # 处理器类型
cpu family      : 6
model           : 85
model name      : Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz    # cpu 的名称,型号,主频
stepping        : 7    # 位于相同物理封装中的逻辑处理器的数量
microcode       : 0x5003302
cpu MHz         : 2394.374
cache size      : 16896 KB
physical id     : 0    # 物理封装的唯一标识符
siblings        : 2    # 单 cpu 的逻辑核数
core id         : 0    # 每个内核的唯一标识符
cpu cores       : 2    # 位于相同物理封装中的内核数量
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
bugs            : spectre_v1 spectre_v2 spec_store_bypass
bogomips        : 4788.74
clflush size    : 64
cache_alignment : 64
address sizes   : 45 bits physical, 48 bits virtual
power management:

View Number of physical CPUs

cat /proc/cpuinfo | grep "physical id" | uniq | wc -l

View each physical The number of cores in the CPU

cat /proc/cpuinfo | grep "cpu cores" | uniq

##View the number of all logical CPUs in the system (The number of cores in all physical CPUs plus the number of hyperthreads) can be viewed through the following command.

cat /proc/cpuinfo | grep "processor" | wc -l

View system memory information

cat /proc/meminfo

MemTotal:       24656144 kB    # 系统的物理内存
MemFree:        20415000 kB    # 物理内存
MemAvailable:   23038032 kB
Buffers:          194668 kB    # 缓冲区
Cached:          2575064 kB    # 缓存
SwapCached:            0 kB
Active:          1785688 kB
Inactive:        1789328 kB
Active(anon):     795436 kB
Inactive(anon):    18024 kB
Active(file):     990252 kB
Inactive(file):  1771304 kB
......省略部分内容

View disk partition information

fdisk -l

Disk /dev/nvme0n1: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfa430a69

Device         Boot   Start       End   Sectors Size Id Type
/dev/nvme0n1p1 *       2048   2099199   2097152   1G 83 Linux
/dev/nvme0n1p2      2099200 209715199 207616000  99G 8e Linux LVM

Disk /dev/mapper/cs-root: 65.2 GiB, 69960990720 bytes, 136642560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/cs-swap: 2 GiB, 2176843776 bytes, 4251648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/cs-home: 31.8 GiB, 34158411776 bytes, 66715648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Related recommendations: "

Linux Video Tutorial

The above is the detailed content of What are the subsystems not included in Linux kernel management?. 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