Linux core -- 1. Preface

Source: Internet
Author: User
Article title: Linux core-1. Preface. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Original: David A Rusling
  
Translation: Banyan & fifa
  
This book is intended for Linux enthusiasts who want to learn how the Linux kernel works. It is not an internal manual. It mainly describes the principles and mechanisms of Linux design, and how the Linux kernel works and its causes.
  
Linux is still being improved. This book is based on the 2.0.33 core, which is currently popular and has stable performance.
  
Version 0.8-3
  
David A Rusling
  
David.rusling@arm.com
  
Preface
Linux is a unique phenomenon on the Internet. Although it is developed by students' hobbies, it has become the most popular free operating system. Linux is a mystery for many people. How can free things become so valuable? In a world dominated by a few software companies, how did a bunch of hackers write something that competes with the products of those companies? How are these software distributed to people around the world who want stable products? In fact, Linux is indeed stable and competitive. Many universities and research institutions use Linux to complete their daily computing tasks. People use Linux on their home PC, and many companies are using it-although they are not always happy to admit it. Linux is mainly used to browse the WEB, manage WEB sites, write and send emails, and play games. Linux is definitely a professional operating system rather than a toy. its fans are all over the world.
  
The Linux source is traced back to the oldest UNIX. In 1969, Ken Thompson of Bell Labs began to develop a multi-user, multi-task operating system using an idle PDP-7 computer. Soon, Dennis Richie joined the project and, with their joint efforts, created the earliest UNIX. Richie was inspired by MULTICS, an earlier project, and named the operating system Unix. Early UNIX was written in assembly language, but its third version was redesigned with a brand new programming language C. C is the programming language designed by Richie and used to compile the operating system. With this rewrite, Unix can be ported to a more powerful DEC PDP-11/45 and 11/70 computers. What happened later, as they said, has become history. Unix came out of the lab and became the mainstream operating system. now almost every major computer vendor has its own version of Unix.
  
Linux originated from the simple needs of a student. Linus Torvalds, the author and principal maintainer of Linux, the only software he can afford when attending college is Minix. Minix, a Unix-like, simple operating system widely used to assist in teaching. Linus was not very satisfied with Minix, so he decided to write the software by himself. He started his work on an Intel 386 PC based on the familiar Unix of the student age. He has made rapid progress and is encouraged by his achievements. he shares this achievement with other students through the Internet and is mainly used in academic fields. Someone saw the software and started distributing it. Whenever a new problem occurs, someone will immediately find a solution and add it to it. soon, Linux becomes an operating system. It is worth noting that Linux does not include the Unix source code. It was rewritten according to the public POSIX standard. Linux uses a lot of GNU software from the Cambridge free software fund in Massachusetts, and Linux itself is built with them.
  
Many people regard Linux as a simple tool and put it into CDROM for distribution. Many Linux users use it to write applications or run applications compiled by others. These people are eager to read the HOWTO Manual. when a part of the system is correctly set up, they are always excited and frustrated when they fail. Only a small number of people dared to write device drivers and provide the core patches to Linus Torvalds. Linus Torvalds received supplemental code and modified the core code from each volunteer.
  
This situation sounds messy, but Linus has very strict quality control and is responsible for adding all the new code to the core. Only a few people contribute source code to the Linux core. Most Linux users do not care about how the system works or how it is combined. This is a pity, because reading the Linux source code provides an excellent opportunity to learn the operating system. This is not only because it is well written, but also because its source code can be obtained for free. Although the authors reserve copyright for their software, the source code can be freely distributed under the GNU Public authorization of the free software fund. At first glance, the source code is very complex. However, after further observation, you can find that the source code directory contains the Kernel, mm, and net directories, however, if you want to know that these directories contain the code and how the code works, you need to have a deep understanding of the overall structure and objectives of Linux. In short, this is what this book hopes to achieve, providing readers with a clear impression on how Linux works. When you copy files from one directory to another or read emails, you may want to outline what is happening in the system, I still clearly remember the excitement when I first realized that the operating system was really working. This excitement is exactly what I want to bring to the readers of this book.
  
I first came into contact with Linux. in the second half of 1994, when I visited Jim Paradis, he was working on porting Linux to the Alpha AXP processor system. I have been working in DEC since 1984. my main job is networking and communication. In 1992, I started working for the newly established Digital semicondubranch. The task of this division is to fully enter the commercial chip market and sell chips, especially the Alpha AXP series processors and Alpha AXP system boards other than DEC. When I first heard about Linux, I immediately realized that this was an interesting opportunity. Jim's enthusiasm is confusing, and I started to help him work together. At work, I like the operating system and the group of engineers who created it more and more.
  
Alpha AXP is only one of multiple platforms that Linux can run. Most Linux systems work on Intel processor-based systems, but there are more and more Linux users than Intel systems. These parameters are Alpha AXP, ARM, MIPS, and Power PC. Although I can write the content of this book based on any platform described above, my technical knowledge and background allow me to write it mainly based on the Alpha AXP processor and arm processor. This book sometimes uses non-Intel hardware to describe some important points. It is worth noting that, no matter which platform is running, 95% of the Linux core code is the same. Similarly, 95% of the content in this book is about the machine-independent part of the Linux kernel.
  
This book has no requirements on the reader's knowledge and experience. I believe that interest in something is a necessary factor to encourage self-study. However, your understanding of computers, PCs, and C programming languages will help you benefit from the relevant materials.
  
Organization of the book
This book is not a specific Linux internal manual. Instead, it introduces the operating system and uses Linux as an example. Each chapter in the book follows the principle of "from commonalities to Characteristics. They will first give an overview of the core subsystems, and then describe them as detailed as possible. I will not use routine_X () to call routine_Y () to add the value of the foo field in the bar data structure to describe the core algorithm. You can read the code to find it. Whenever I need to understand a piece of code, I always draw out its data structure. In this way, I found many related core data structures and their relationships. Each chapter is very independent, just like the Linux core subsystem. Of course, sometimes they are related. for example, if you do not understand how the virtual memory works, you cannot describe the process. The basic concepts of hardware chapter briefly introduces modern PC. The operating system must work closely with the hardware system. The operating system requires services that can only be provided by hardware. To fully understand Linux, you must understand basic hardware knowledge. The basic concepts of software chapter introduces the basic principles of software and C programming language. This article discusses the tools used to establish an operating system such as Linux and provides an overview of the objectives and functions of the operating system. This chapter describes how Linux processes physical memory and virtual storage technology. Process management describes the concept of processes and how processes in the system are created, managed, and deleted at the core of Linux. Inter-process and inter-core communication to coordinate their activities. Linux supports a large number of inter-process communication (IPC) mechanisms. There are two types of signals and pipelines. Linux also supports the System v ipc mechanism. These inter-process communication mechanisms are described in the IPC chapter. The PCI standard has become the bus standard for low-price and high data transmission rates on PCs. The PCI chapter describes how the Linux core initializes and uses the PCI bus and devices. The interrupt and interrupt processing chapter focuses on the Linux core interrupt processing. Although there are common mechanisms and interfaces for handling interruptions, some details are related to the hardware and CPU architecture. One of the strengths of Linux is its strong support for modern PC hardware devices. The device driver chapter describes how Linux controls physical devices in the system. The file system chapter describes how to maintain files in the file system supported by Linux. It also describes how a virtual file system (VFS) and a Linux core file system are supported. The network is almost synonymous with Linux. In a sense, Linux is the product of internet connection in the WWW age. Its developers exchange information and code through the Web. The network chapter describes how Linux supports the TCP/IP network protocols. The core mechanism chapter mainly discusses some general tasks and mechanisms provided by the core to make other parts of Linux work effectively. The dynamic module chapter describes how Linux core dynamically loads certain modules, such as file systems, as needed. The processor chapter provides a brief introduction to some processors that can be run on Linux. The resource chapter provides useful information about Linux core resources.
  
Related Article

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.