Linux core - 1. Preface

xiaoxiao2021-03-06  119

Original: David a Rusling Translation: Banyan & FIFA (2001-04-27 13:52:07)

Original: David a Rusling Translation: Banyan

& FIFA

-------------------------------------------------- ------------------------------

This book is written for Linux fanatic enthusiasts who want to know Linux kernel work. It is not an internal manual. It mainly describes the principles and mechanisms of Linux design; and how the Linux kernel works and its reasons.

Linux is still constantly improving; this book is based on the current comparative epidemic and stable 2.0.33 core.

Version 0.8-3

David a rusling

David.rusling@arm.com

-------------------------------------------------- ------------------------------

Foreword

Linux is a unique phenomenon on interconnection. Although it is developed by students' hobbies, it is now the most popular free operating system. For many people, Linux is a mystery. How can free things be so valuable? In a world ruled by a few software companies, what is the company's products that HACKERs compete with those companies? How do these software distribute to people distributed in all corners of the world, want to get 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 household PC, many companies are also using it - although they are not always happy to admit this. Linux is mainly used to browse web, manage web sites, write and send email, and play games. Linux is definitely not a toy but has a professional level of operating system, and its enthusiasts have all over the world.

The source of Linux is dating back to the oldest UNIX. In 1969, the Bell Laboratory's Ken Thompson has developed a multi-user and multitasking operating system using an idle PDP-7 computer. Soon, Dennis Richie joined this project and has born the earliest UNIX under their joint efforts. Richie is named UNIX by an earlier project - Multics. Early Unix is ​​written in assembly language, but its third version is redesigned with a new programming language C. C is a program language that Richie is designed and used to write an operating system. Through this rewriting, UNIX is ported to a more powerful DEC PDP-11/45 and running on the 11/70 computer. Everything that happened, as they said, have become history. Unix comes out from the laboratory and has become the mainstream of the operating system, and now almost every major computer manufacturer has its own version of UNIX.

Linux originated from a simple requirement of a student. Linus Torvalds, Linux Authors and the only software bought at home is minix. Minix is ​​a simple operating system similar to Unix, widely used to assist teaching. Linus is not very satisfied with Minix, so I decide myself. He started his work on an Intel 386 PC as a prototype. His progress is very fast, encouraged by work, and he shares this result through the internet and other students, mainly for academic fields. Some people saw this software and began to distribute. Whenever a new problem occurs, someone will find a solution and add it, soon, Linux has become an operating system. It is worth noting that Linux does not include a UNIX source code. It is rewritten in accordance with the public POSIX standard. Linux uses a large number of GNU software from the Massachusetts Cambridge, while Linux itself is also constructed. Many people treat Linux as a simple tool and put it into CDROM. Many Linux users use it to write applications or run the app written by others. These people are enthusiastic to read the Howto manual. When a part of the system is set correctly, they are always exciting, and when failure, it is frustrated. Only some people dare to write equipment drivers and provide the core patch to Linus Torvalds, Linus Torvalds receive supplemental code from each volunteer to the core modification code.

This situation sounds very confused, but Linus has a very strict quality control and is responsible for adding all new code to the core. Only some people contribute source code for Linux core. Most Linux users don't care about how the system works, or how to combine. This situation is regrettable because reading Linux source code provides a great opportunity to learn the operating system. This is not just because it is well written, but also because it's free code. Because although the authors retain their software, the next source code is freely distributed at the GNU public authorization of the free software fund. The first look, the source code is very complicated. But through further observation you can find that the source catalog contains the directory of kernel, mm, and net, but if you want to know how the code is included in these directories, how to work is, you need to have a deeper on Linux's overall structure and goals. understanding. In short, this is also the goal hoped by this book, providing readers with a clear impression of how Linux works. When you copy the file from a directory to another or read the email, you may wish to take a look at what happen in your mind. I will still remember that when I feel the first time I realized the operating system is really working. Excitement. This excitement is exactly what I want to bring it to the book.

I first touched Linux in the second half of 1994, when I visited Jim Paradis, he was being dedicated to port Linux to the Alpha Ax processor system. Since 1984, I have worked in DEC, and the main job is network and communications. In 1992 I started working for the newly established Digital Semiconductor. The task of this segment is to fully enter the commercial chip market and sell chips, especially Alpha Ax Series processors, and ALPHA AXP system panels other than DEC. When I first heard Linux, I immediately realized that this is an interesting opportunity. Jim's fanaticism is convulsive, I also started working together. At work, I am more and more like this operating system and created its engineer group.

Alpha AXP is only one of a variety of platforms that Linux can run. Most Linux core works on an Intel processor-based system, but more and more Linux users in the non-Intel system. They are Alpha Ax, ARM, MIPS, SPARC and Power PC. Although I can write the content of this book according to any of the platforms, my technical knowledge and background let me be written primarily based on the Alpha Ax processor and the ARM processor. This is a book sometimes using non-Intel hardware to describe some important views. It is worth noting that 95% of Linux core code is the same regardless of which platform is running. Similarly, the content of 95% of this book is a discussion of the machine-independent part of the Linux kernel. This book does not require any requirements for readers' knowledge and experience. I believe that the interest of a thing is to encourage self-study necessary factors. However, for the computer, or the understanding of the PC and C programming will help readers benefit from the relevant materials.

Organization of this book

This book is not a special handbook for Linux. Instead, it is an example of the operating system while linux is used as an example. Each of the books follows the principle of "from the commonality to characteristics". They will first give a marketer of the core subsystem, and then perform as much detailed as possible. I don't use routine_x () to call Routine_y () to increase the value of the FOO domain in the BAR data structure to describe the core algorithm. You can find it by reading the code. Whenever you need to understand a piece of code, I always draw a data structure. This finds many related core data structures and the relationship between them. Each chapter is very independent, just like a Linux core subsystem. Of course, if they still have contacts, for example, if you don't understand the virtual memory work, you cannot describe the process. The basic concept of hardware is a brief introduction to modern PC. The operating system must work closely with the hardware system. The operating system requires some services that can only be provided by the hardware. To fully understand Linux, you have to understand the basics of hardware. Software Basic Concepts This section describes the basic principles and C programming languages. The tools for establishing Linux are discussed and the target and function of the operating system are given. Memory Management This chapter describes how Linux handles physical memory and virtual storage technology. Process management describes the process of the process and how Linux core is created, managed and deleted in the system. Inter-process and process and core inter-core communications to coordinate their activities. Linux supports a large number of process communication (IPC) mechanisms. Signal and pipes are two of them, and Linux also supports system V IPC mechanisms. The inter-process communication mechanisms are described in the IPC chapter. External Equipment Interconnect (PCI) standard has become a bus standard for low-priced high rates on PC. Chapter PCI will describe how Linux core initializes and uses PCI bus and equipment. Interrupt and Interrupt Processing will focus on Linux core to interrupt. Although there are universal mechanisms and interfaces, some details are related to hardware and CPU architectures. One of Linux is its strong support for hardware equipment for modern PCs. The device driver chapter will describe the Linux core how to control physical devices in the system. File System Chapter Cases how Linux core is how to maintain files in the file system it support. Also describing how each file system for virtual file system (VFS) and Linux core is supported. The network is almost synonymous with Linux. In a sense, Linux is the product of the Internet of Times. Its developers exchange information and code through the web. The online chapter describes how Linux supports these network protocols for TCP / IP. Chapter 1 of the Core Mechanism The main discussion can make the common tasks and mechanisms provided by other parts of Linux core and by the core. Dynamic Module One Chapter 1 describes how the Linux core is only dynamically load certain modules, such as a file system. The processor first gives a brief introduction to some processors that Linux can run on it. The resource chapter provides useful information about Linux core resources.

转载请注明原文地址:https://www.9cbs.com/read-125774.html

New Post(0)