[Linux Kernel] Linux Kernel Architecture (Process Scheduling | Memory Management | Interrupt Management | Device Management | File System)





1. Process scheduling



Process scheduling:

Process is the basic unit of resource allocation in the system;

When each process is running, it feels that it occupies all the hardware resources,

In fact, a process will not monopolize a resource for a long time,

The operating system uses the process scheduler to make multiple processes execute concurrently;


The Linux kernel does not strictly distinguish between processes and threads;


Process management: including process creation, destruction, thread group management, kernel thread management, queue waiting;


Process scheduling is located in the kernel ;

insert image description here





2. Memory management



Memory management involves physical memory management and virtual memory management , and is the most complex module in the Linux kernel;


Virtual memory management includes: reverse mapping, KSM, MMAP mapping, page fault interrupt, shared memory, process virtual address space management, page recycling;

Physical memory management includes: page allocator, etc.;


Memory management is located in the kernel ;

insert image description here





3. Interrupt management



Interrupt management includes: processor exception handling, interrupt handling;

Exception refers to the detection of abnormal conditions when the processor executes, the processor needs to stop the currently executing stack and handle the exception;


Interrupt management is located in the kernel ;

insert image description here





4. Equipment management



The Linux kernel supports the most peripheral types,

  • device tree
  • PCI bus device
  • Device model Kobject
  • ACPI
  • network device driver
  • block device driver
  • character device driver

Device management is located in the kernel ;

insert image description here





5. File system



File system application scenarios:

  • F2FS
  • EXT 2/3/4
  • XFS

In order to support various file systems, the Linux kernel abstracts a virtual file system VFS , which is a software layer of the file system, so that the Linux kernel can easily integrate various file systems;


The file system is located in the kernel ;

insert image description here

Guess you like

Origin blog.csdn.net/han1202012/article/details/123649559