First knowledge of the Linux kernel
Linux was born in 1991 in the year of Linustorvalds.
POSIX represents a Portable operating system interface (portable Operating system Interface). POSIX is a product that appears in the Uni standardization process. the POSIX 1003.1 standard defines a minimal UNIX operating system interface for any operating system only if this standard is met, it is possible to run Unix programs.
GNU is a recursive abbreviation of GNU is not Unix and is a project of the Free Software Foundation. GNU Project products include the Emacs Editor, the well-known GNU C and Gcc compilers, and the software called GNU Software. GNU Software and derivative work are applicable to the GNU Common Public License, which is the GPL(General publicly License)Linux has been developed using a multitude of GUN tools. the GPL allows software authors to have software copyrights, but the GPL grants anyone else the right to legally reproduce, distribute, and modify the software.
The software is as follows:
(1) Meet POSIX Standard operating system kernel, Shell and peripheral tools ;
(2) C language compilers and other development tools and function libraries ;
(3) X window Windows system ;
(4) a variety of application software, including word processing software, image processing software.
Linux Development methods:
(1) the crystallization of the collective wisdom of software enthusiasts around the world
(2) Open and collaborative approach to development. Provide source code, comply with GPL.
(3) experienced a variety of testing and test, the stability of the software is good.
(4) Developers with interest to develop, enthusiastic, creative.
Introduction to the Linux kernel:
The system kernel developed by the development team under Linus is at the heart of all Linux releases. The kernel developers are generally more than hundred people, any free programmer can submit their own modification work. Use mailing lists for project management, communication, and error reporting. There are a large number of users to test, the official release of the code high quality.
Linux Kernel Technical features:
(1) The Linux kernel is designed as a single-core architecture (Monolithic), relative to the microkernel;
(2) 2.6 version of the Linux kernel is a single-threaded structure-that is, at the same time only one execution thread is allowed to run in the kernel, will not be interrupted by the scheduler to run other tasks, the kernel is called non-preemption;
(3) The Linux kernel supports dynamic loading of kernel modules;
(4) The Linux kernel provides services passively;
(5) the Linux kernel uses virtual memory technology to make the memory space up to 4GB. Wherein 0-3g belongs to the user segment, 3-4g belongs to the kernel segment;
(6) The file system of Linux implements an abstract file system-Virtual file system (Filesystem SWITCH,VFS), which belongs to UNIX style;
(7) Linux provides a set of effective deferred execution mechanisms-the lower half, the soft interrupt,the Tasklet, and the 2.6 version introduced in the work queue.
the location of the Linux kernel ;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/48/D5/wKioL1QLua6QuD-fAADagRGbwws052.jpg "title=" The Linux kernel is located in the system. jpg "alt=" wkiol1qlua6qud-faadagrgbwws052.jpg "/>
Graphic:
user Process-runs on a large collection of software on top of the Linux kernel.
System calls-the kernel exits, and the user program uses the functionality provided by the kernel.
Linux Kernel-the soul of the operating system, responsible for managing the disk files, memory, responsible for starting and running the program, responsible for receiving and sending packets from the network and so on.
Hardware-Includes all possible physical devices that are required for Linux installation. For example,CPU, memory, hard disk, network hardware, and so on.
Linux kernel Architecture:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/48/D3/wKiom1QLubuzP_3lAAE4NYZrm-o013.jpg "title=" Kernel subsystems and their relationships. jpg "alt=" wkiom1qlubuzp_3laae4nyzrm-o013.jpg "/>
Graphic:
process Scheduling-controls the process access to the CPU.
Memory management-allows multiple processes to safely share the main memory region
Virtual file system-hides the specifics of various hardware and provides a unified interface for all devices.
Network-provides access to various network standard protocols and support for various network hardware.
inter-process communication (IPC) - supports various communication mechanisms between processes, including shared memory, message queues, and pipelines.
Linux kernel version:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/48/D5/wKioL1QLud_AGH1wAAE7bTfzFkQ484.jpg "title=" Linux kernel version tree. jpg "alt=" wkiol1qlud_agh1waae7btfzfkq484.jpg "/>
Graphic:
the Linux kernel has two different version numbers, the experimental version and the product version. The mechanism uses '. ' split numbers indicate that the first number represents the major version number, the second number is the version number, the third number represents the revision number, and the fourth number represents a stable version number. From the version number to the odd is the experimental version, the even is the product version. Example: a kernel with a version number of 2.6.30.1.
Linux Kernel source code structure:the Linux kernel source code is located in the/usr/src/linux directory, the main structure directory is as follows
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/48/D4/wKiom1QLue6zY-8XAAER_8hT6rk844.jpg "title=" Linux source code distribution structure. jpg "alt=" wkiom1qlue6zy-8xaaer_8ht6rk844.jpg "/>
Graphic:
include/ The subdirectory contains most of the included files needed to build the kernel code, and the module rebuilds the kernel with other modules.
init/ The subdirectory contains the kernel's initialization code, which is the starting point for the kernel to start working.
arch/ The subdirectory contains all the hardware-specific kernel code, such as arch/ Sub-directories are i386,ARM and Alpha modules, and so on.
drivers/ The directory contains all the device drivers in the kernel, such as character devices, block devices ,scsi Device drivers, and so on.
fs/ The directory contains all the file system code, such as:ext3,ext4,NTFS module code, and so on.
net/ The directory contains the network code for the kernel.
mm/ The directory contains all the memory management code.
ipc/ The directory contains the code for interprocess communication.
kernel/ The directory contains the main kernel code.
Linux Kernel Source Code analysis tool:
(1) Linux Hypertext Cross-code search tool LXR (Linuxcross Reference);
(2) Windows Platform under the source Code reading tool Sourceinsight.
First knowledge of the Linux kernel