[Kernel Driver]Linux Overview

00. Table of Contents

01. Introduction to Unix

The UNIX system is a time-sharing system. The earliest UNIX system came out in 1970. Previously, there were only operating systems for batch jobs, which were too slow for users who needed immediate responses. In the late 1960s, both Kenneth Thompson and Dennis Ritchie participated in the design of the interactive time-sharing system Multics, and the tool used to develop the system was CTSS. Both systems had a major impact on the development of operating systems. On this basis, in the process of refining and developing the existing technology at the time, K. Thompson developed the UNIX system on a small computer in 1969 and put it into operation in 1970. [2]

In 1972, Dennis Ritchie developed the C language to rewrite UNIX originally written in assembly language, resulting in UNIX VersionV. In 1974, "The UNIX Time-Sharing System" co-written by Kenneth Thompson and Dennis Ritchie was published on Communication of ACM, officially disclosing the UNIX system to the outside world.

At that time, the PDP-11 series of small computers had been widely used around the world. Once the UNIX system was developed, it was widely equipped on the PDP-11 series computers of various universities in the United States, thus creating material conditions for the widespread application of UNIX.

In 1978, UNIX Version VI was released, and was later used in the VAX-11 super minicomputer in 1979. Since then, various new versions have continued to appear. American Telephone and Telegraph Company released AT&T UNIX SystemII and UNIX SystemV in 1981 and 1983 respectively. The University of California, Berkeley, has also released UNIX versions BSD4.1, BSD4.2 and BSD4.3.

The number of users of UNIX systems is increasing day by day, and the scope of applications is also expanding. Whether on various types of microcomputers, minicomputers, medium and large computers, as well as on computer workstations and even personal computers, many are already equipped with UNIX systems. Not only are newly launched models equipped with UNIX systems, but some manufacturers with a long history are also competing to equip original models with UNIX systems in order to open up sales and compete for the market.

In 2020, Apple released an upgraded version of the operating system, which combines the powerful functions of the UNIX operating system with the ease of use of Apple computers, improving the computer's running speed and battery life.

02. Introduction to Linux

Linux, generally refers to GNU/Linux (the Linux kernel alone cannot be used directly, and is usually paired with the GNU suite, hence the name). It is a UNIX-like operating system that is free to use and freely disseminated. Its kernel was developed by Linus Ben First released by Linus Benedict Torvalds on October 5, 1991, it is mainly inspired by Minix and Unix ideas. It is a POSIX-based multi-user, multi-tasking, multi-threading and multi-CPU support. operating system. It supports 32-bit and 64-bit hardware and can run major Unix software tools, applications and network protocols.

Linux inherits the network-centric design philosophy of Unix and is a multi-user network operating system with stable performance. There are hundreds of different Linux distributions, such as Debian and Archlinux based on community development, and Red Hat Enterprise Linux, SUSE, Oracle Linux, etc. based on commercial development.

On November 20, 2022, Linux submitted the last batch of drm-intel-next function patches, and Linux 6.2 will usher in official support for Intel Sharp independent graphics.

03. Linux development history

1991

August 25: Linus Benedict Torvalds, a 21-year-old Finnish student, announced on the comp.os.minix newsgroup that he was writing a free operating system.

September 1: Linux 0.01 is released online.

2007

June 6: ASUS exhibited two "Eee PCs" at the 2007 Taipei Compute Show: 701 and 1001. The first batch of Yi PCs are pre-installed with Xandros Linux, which is a Debian-based, lightweight Linux distribution optimized for small screens.

August 8: The Linux Foundation was jointly established in 2007 by the Open Source Development Laboratory (OSDL) and the Free Standards Group (FSG). The purpose of this foundation is to sponsor the work of Linus, the founder of Linux. The Foundation is supported by major Linux and open source companies including Fujitsu, HP, IBM, Intel, NEC, Oracle, Qualcomm, Samsung and developers from around the world.

November 5: Unlike the previously speculated release of Gphone, Google announced the formation of the Open Handset Alliance and the release of Android, which is called "the first truly open comprehensive mobile device platform."

2011

May 11: Chromebook was released at the 2011 Google I/O conference. This is a laptop running the so-called cloud operating system Chrome OS. Chome OS is based on the Linux kernel.

June 21: Linus Torvalds released version 3.0 of Linux.

2013

December 13: Valve Corporation releases the Linux-based SteamOS operating system, a video game console system.

The birth, development and growth process of the Linux operating system has always relied on five important pillars: Unix operating system, MINIX operating system, GNU project, POSIX standard and Internet network.

In the 1980s, the performance of computer hardware continued to improve, and the PC market continued to expand. The main operating systems available for computers at that time were Unix, DOS, and MacOS. Unix is ​​expensive and cannot run on PCs; DOS is crude and its source code is strictly kept secret by software manufacturers; MacOS is an operating system specially used for Apple computers.

At this time, the field of computer science urgently needs a more complete, powerful, cheap and fully open operating system. Since there are few typical operating systems for teaching use, Andrew S. Tanenbaum, an American who was a professor in the Netherlands at the time, wrote an operating system called MINIX in order to teach students about the inner workings of the operating system.

Although MINIX is good, it is only a simple operating system for teaching purposes, not a powerful practical operating system. However, the biggest advantage is that the source code is open. Computer students all over the world study the MINIX source code to understand the MINIX operating system running on the computer. Linus Torvalds, a second-year student at the University of Helsinki in Finland, is one of them. On the basis of absorbing the essence of MINIX, Linus wrote his own Linux operating system in 1991, version Linux0.01, which marked the beginning of the Linux era. He used the core of Unix, removed the complicated core programs, rewritten it into an x86 system suitable for general computers, and put it on the Internet for everyone to download. In 1994, he launched the complete core Version 1.0. At this point, Linux has gradually become a fully functional and stable operating system and is widely used.

In June 2021, according to the char-misc-next submission that Linux 5.14 has just entered the merge queue, Linux 5.14 officially removed the RAW driver.

In June 2022, the official version of Linux Lite 6.0 based on Ubuntu 22.04 was released, providing the latest browser, the latest office suite, and the latest customized software, codenamed "Fluorite".

According to news on November 6, 2022, Microsoft will bring nested virtualization support to Linux, which can run multiple Windows.

In November 2022, Microsoft launched WSL 1.0.0 version on GitHub, announcing that the Linux subsystem of Windows 11/10 would delete the Preview label and usher in the official version.

In November 2022, in this week's platform-drivers-x86 submission merge, Linux 6.1 added support for Microsoft Surface Pro 9 and Surface Laptop 5 devices.

On December 12, 2022, Linus Torvalds released the latest Linux 6.1 kernel stable version before the Christmas holiday, opening the Linux 6.2 merger window. As of early 2023, you can find the corresponding files on the kernel official website.

On December 14, 2022, the Linux 6.2 merge window expanded support for Arm SoC and updated DeviceTree. This update adds support for seven Qualcomm Snapdragon processors in the kernel, and also initially supports Apple's M1 Pro / M1 Ultra / M1 Max model processors in Mainline.

On December 15, 2022, it was confirmed that a large number of network subsystem updates will be merged during the Linux 6.2 merge window. As with previous releases, the Linux 6.2 kernel update cycle includes a number of improvements to networking functionality. More details can be found in this pull.

According to news on December 28, 2022, during the Linux 6.2 merge window, the Linear Address Masking (LAM) proposal submitted by Intel engineers was rejected by Linus Torvalds. Intel engineers will submit version 13 again in early 2023, hoping to incorporate this feature in Linux 6.3 or later.

According to news on January 9, 2023, Linus Torvalds launched the third candidate version update of Linux Kernel 6.2.

According to news on March 27, 2023, Linus Torvalds released the fourth maintenance version update of Linux Kernel 6.3, which means that the development cycle of 6.3 has passed half of the journey. [20]

May 3, 2023, IT House News: Uri Herrera released the Nitrux 2.8 system at the end of April, which is a GNU/Linux distribution based on Debian and systemd-free, focusing on KDE software and Plasma desktop.

On May 29, 2023, MX Linux developers announced that the public test of the MX Linux 23 "Libretto" version Beta has been fully launched.

On June 26, 2023, the Linux 6.4 kernel was officially released. This update brought many improvements, such as initial support for Apple's M2 chip, improved storage performance, improved sensor monitoring, and more Rust code.

04. The difference between single kernel and microkernel

Single kernel: All kernels are implemented as a single large process as a whole, running in the kernel address space, and kernel communication is simple. The kernel is usually stored on disk as a single static binary file. Simple and high-performance, most Unix are single-core.

Microkernel: The microkernel function is divided into multiple processes. Each process runs in a separate address space. Microkernel communication needs to be handled through inter-process communication IPC. Only processes with strong requests run in the kernel state, and other processes are in the user state. IPC is expensive and involves context switching between user mode and kernel mode. Therefore, most microkernel implementations (Windows NT, OS X) run all microkernel processes in kernel mode.

05. Linux kernel

Linux is a single kernel, but it absorbs the essence of microkernel: modularization, preemptive kernel, support for kernel threads, and dynamic loading of kernel modules

Kernel is the Linux kernel. The Linux kernel adopts the macro kernel architecture, that is, most of the functions of Linux will be implemented in the kernel, such as process management, memory management, device management, file management, network management and other functions. In the process of development of Linux, the introduction of The kernel module (Loadable Kernel Module, LKM) mechanism, the full name of the kernel module is dynamically loadable kernel module, which means that a set of target codes can be dynamically loaded to implement certain specific functions when the kernel is running, without the need to recompile in the process. The kernel can achieve dynamic expansion.

06. Linux kernel composition

The Linux kernel is mainly composed of 5 parts: process management subsystem, memory management subsystem, file subsystem, network subsystem, and device subsystem.

Insert image description here

1. Process management

Responsible for the creation and destruction of processes and process scheduling.

2. Memory management

Responsible for the allocation and recycling of memory, recording which memory is used by which processes, managing virtual memory, and mapping the physical address and logical address of the memory, which is mainly converted by the MMU in the form of page tables.

3. File system

The file system here is not just the abstract management of the hard disk, it can also be the abstraction of certain IO ports; the file system shields the underlying details and provides a unified interface for the upper layer; everything in Linux is a file.

4. Equipment management

The device management function is mainly provided by the driver, and its main task is to control the device to complete input or output operations; Linux treats devices as special files, and the system manages and controls various devices through the interface for processing files (virtual file system VFS).

5. Network function

The value of network functions is that in addition to the basic hardware operations provided by the driver, there are also mechanisms and functions provided by the system, such as TCP protocol, address resolution, etc.

07. Linux official website

Website: https://www.kernel.org/
Insert image description here

You can download the latest version of the kernel file here, but most of them are not adapted to the corresponding chip. The adapter chip is adapted by the original chip manufacturer.

08. Appendix

Guess you like

Origin blog.csdn.net/dengjin20104042056/article/details/132795796