Linux Learning Note: "001" Linux kernel analysis

Source: Internet
Author: User
Tags posix cpu usage

Linux kernel

The Linux kernel is one of the most important components of the Linux system and consists of 5 subsystems.

Process scheduling:

Process scheduling (SCHED) controls the process's access to the CPU. When the next process needs to be selected to run, the scheduler chooses the process that is most worth running.

Process scheduling in a central location, all other subsystems rely on it because

A running process is actually a process that waits only for CPU resources, and if a process waits for another resource, the process is not running. (e.g. into a blocking state)

The process scheduling mechanism of Linux is relatively simple and is based on the priority level.

Memory Management:

Memory management allows multiple processes to safely share the main memory area. Linux memory management supports virtual memory, that is, the programs allowed in the computer, the total amount of code, data, and stacks can exceed the actual physical memory size, the operating system just keep the currently used block in memory, the rest of the program blocks remain on disk (lazy load lazy load mechanism).

When necessary, the operating system is responsible for the disk and memory exchange program blocks. Memory management is logically divided into hardware-independent and hardware-related 2 parts.

The Hardware-independent section provides a mapping of processes and swapping of logical memory.

The hardware-related section provides a virtual interface for memory management hardware.

Virtual file system

The virtual file system hides the specifics of various hardware, providing a unified interface for all devices.

VFS provides dozens of different file systems, and VFS itself can be divided into logical file systems and 2 parts of device drivers.

A logical file system is a file system supported by Linux, such as ext2, fat, and so on.

Device drivers refer to the device driver modules that are written for each hardware controller.

/*Learn about the file system types it supports, which can be viewed by the following command: # ls/lib/modules/#版本号 #/kernel/fs1.minix: Is the file system used by the Minix operating system and is the first file system used by Linux. It has many drawbacks: the partition can only be less than 64MB, only support short-name, single timestamp, and so on. It is still useful in the field of floppy disk and dynamic disks. 2.ext is an extension to the Minix. has been completely superseded by ext2, and the kernel will not eventually support it. 3.EXT2 is a well-performing file system used by Linux for fixing file systems and active file systems. It is designed as an extension of the Ext file system. EXT2 provides the best performance (in terms of speed and CPU usage) for Linux-supported file systems, and in short, ext2 is the main file system for Linux. 4.EXT3 is an extension of the ext2 added log function. It forwards, backwards compatible with ext2. It means that ext2 can be converted to EXT3,EXT3 without losing data and formatting, and can be converted to ext2 without losing data (just reinstall the partition). I've been using ext3 since October 2001 and it's simple and stable. In RedHat7.2 and Mandrake8.0, as an option. It is highly recommended to use this file system. 5.xiafs is a stable, secure extension of the Minix file system, providing the basic most common features. Development and maintenance have been discontinued at this time. Not used very often. 6.msdos is a file system used by DOS, Windows, and some OS/2 computers. The file name cannot exceed 8 characters, followed by a 3-character suffix. 7.umsdos is the Extended DOS file system used by Linux. Added long file name support, uid/gid,posix permissions, special files and so on and still maintain compatibility with DOS file system. 8.vfat is an extended DOS file system used by Windows95,windows NT. Add long file name support. 9.proc is a fake file system for interfacing with kernel data structures that does not occupy disk space and references man Proc. 10.ISO9660 is a CD-ROM file system for the ISO9660 standard. Two extensions are automatically supported (see below). 11.High Sierra is the predecessor of the ISO9660 standard. Linux automatically supports it. Rock Ridge is a product of the Rock Ridge Interchange Protocol protocol that further describes the files under the ISO9660 file system to UNIX systems. In addition, such as a long textName, uid/gid,posix permissions, and other information. Linux automatically supports it. 12.HPFS is a high-performance file system used by OS/2. is read-only in Linux systems because of the lack of documentation. 13.SYSV is the implementation of the Systemv/coherent file system on Linux. It implements all the xenix,systemv/386, and coherent file systems. 14.nfs is a file system for accessing remote computer hard drives. 15.SMB is a network file system that supports the SMB protocol, which Windows uses to implement workgroup sharing. 16.NCPFS is a network file system used by Novell NetWare to support the NCP protocol. 17.Devpts is a virtual file system, generally installed in the/dev/pts. In order to get a virtual terminal, the process opens/DEV/PTMX, and then the virtual terminal can be used. 18.fat is not a separate file system, but a common part of MSDOS, Umsdos, and Vfat file systems. 19.UFS is a file system that is widely used in various operating systems 20.swap is a special partition used to exchange data between memory and hard disk file system. 21.raiserfs is a new log file system supported by the Linux kernel 2.4.1 (January 2001). 22.HFS HFS (=hierarchical files System) is the Apple filesystem. 23.ntfs Windows NT File system.*/
Linux-supported file systems

Network interface

Network Interface provides access to various network standards and support for a variety of network hardware.

Network interface can be divided into network protocol and network driver.

The network protocol is responsible for implementing each of the possible network transport protocols.

The network device driver is responsible for communicating with the hardware device, and each of the possible hardware devices has a corresponding device driver.

Inter-process communication

interprocess communication (inter-process communication) supports various communication mechanisms between processes.

Linux Learning Note: "001" Linux kernel analysis

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.