Linux Kernel Analysis (4) ---- Process Management | network subsystem | Virtual File System | driver introduction, linux ----

Source: Internet
Author: User

Linux Kernel Analysis (4) ---- Process Management | network subsystem | Virtual File System | driver introduction, linux ----

Linux Kernel Analysis (4)

I haven't updated it in two days. I analyzed the linux memory management subsystem in the last blog. I didn't want to analyze the process management subsystem, network subsystem, and Virtual File System in this phase, however, in order to give everyone a general grasp of the kernel, we will briefly introduce the remaining subsystems. We only need to understand their functions and part of our analysis on these subsystems, you don't have to go into it. When we write down a few drivers, we will be much clearer when we analyze these subsystems based on the drivers.

In commit (not to mention analysis, just a simple understanding ).

So we will analyze the following content today:

1. Linux Process Management Subsystem

2. Linux network subsystem

3. Virtual File System

4. Introduction to Linux Device Drivers

 

LLinuxProcess Management Subsystem

The most important thing in process management is process scheduling and Process Communication.

1.Process Scheduling

Process scheduling allows multiple processes to grow and execute "micro-serial, macro-parallel" in the CPU. Process Scheduling is in the center of the system, and other subsystems in the kernel depend on it.

A)Meaning of Process Scheduling

Process scheduling allows multiple processes to grow and execute "micro-serial, macro-parallel" in the CPU. Process Scheduling is in the center of the system, and other subsystems in the kernel depend on it.

B)Process status Switching

Linux processes switch between several States, such as the switching relationship.

C)Process Scheduling Policy

The following are common examples in Linux:

1) SCHED_OTHER time-based scheduling policy.

2) SCHED_FIFO real-time scheduling policy, first served

3) SCHED_RR real-time scheduling policy, time slice Rotation

 

2.Process Communication

Linux supports multiple communication mechanisms between processes. Through these communication mechanisms, multiple processes, multi-resource mutex access, and inter-process synchronization and message transmission can be performed.

A)LinuxInter-process communication

1) pipelines: they are divided into famous pipelines (for any process between the same system) and unknown pipelines (for parent and child processes)

2) semaphores

3) Signal

4) Message Queue

5) shared memory

6) socket)

LLinuxNetwork subsystem

The Linux network subsystem provides access to various network standards and support for various hardware. Is its overall structure. It can be divided into the protocol layer and network driver. The network protocol is mainly responsible for implementing each possible network transmission protocol, and the network driver is responsible for communicating with hardware.

LLinuxVirtual File System

Linux Virtual File System (VFS) hides the details of various hardware and provides unified interfaces for all devices. It is an abstraction of various file systems, in fact, the super block is used to store information about the file system, the index node inode is used to store the physical information of the file, and the Directory item dentry is used to store the logical information of the file. The overall architecture is as follows.

LLinuxDevice Drivers

The introduction above is very simple. It just introduces the concepts of these subsystems. Next we will briefly introduce the drivers of linux devices.

1.Device Driver category

Linux is divided into the following three basic devices.

A)Character Device

It is a device that accesses data by byte. Character devices are suitable for most simple hardware. Common LEDs and buttons

B)Block Device

It is a device with a block (usually 512 bytes) as the minimum access unit, common hard disks and SD cards. However, there is no block size limit in linux, so you can access any number of bytes.

C)Network Device

Devices used to send and receive packets, such as NICs.

 

Today's simple analysis is here first, and I will gradually analyze the kernel with driver development. Thank you for your attention.

 



From Weizhi note (Wiz)



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.