Linux 核心(The Linux Kernel)——前言

类别:软件工程 点击:0 评论:0 推荐:
Linux 核心(The Linux Kernel)——前言 作者:毕昕(等) 文章来源:《纯C论坛·电子杂志》 点击数: 193 更新时间:2004-12-4

此文原刊发于:《纯C论坛·电子杂志》2004.11(总第二期)上

Linux 核心(The Linux Kernel)

原著:David A Rusling[1]

翻译[2]:毕昕[3]、胡宁宁[4]、仲盛[5]、赵振平[6]、周笑波[7]、李群[8]、陈怀临[9]

[编者按]

这几位现在已经从南京大学毕业的学生为我们留下了一份宝贵的讲解Linux内核的资料,在此,我们不得不对他们当年的辛苦的工作表示由衷的感谢。由于当时的翻译是按照原作者0.8-2版进行的,在本次收录的时候编者按照原作者的0.8-3版进行了校对,并对其中的一些地方进行了增改及补译。

哈尔滨工业大学计算机科学与技术学院IBM技术中心的吴晋老师对全部译稿进行了审校,在此特表感谢!

 

    我们来自南京大学计算机系分布式计算实验室。石头城下,南北园里,我们一起度过了一些青春岁月。

历尽半年多,《Linux 核心》终于和大家见面了。作为译者,心中非常高兴。基于Linux核心2.0.33,本书介绍了Linux核心是如何工作的。它不是一本关于核心的手册,而是描述了Linux核心中使用的原理,机制和Linux为什么使用这些原理和机制。希望本书能给读者带来些益处。

编译本书的过程中,我们没有局限于原作者的内容,加入了一些译者自己的理解。由于我们的专业和英语水平有限,疏漏之处在所难免。敬请读者谅解并望指出。请给我们发Email或在我们的BBS上留下您的意见。谢谢。

本书版权属于GPL性质。故读者可以在非赢利的目的下随便拷贝和传播。但请标明出处,以尊重我们一字一字的劳动。

谢谢。

 

Copy Right

This book is for Linux enthusiasts who want to know how the Linux kernel works. It is not an internals manual. Rather it describes the principles and mechanisms that Linux uses; how and why the Linux kernel works the way that it does.

 

Linux is a moving target; this book is based upon the current, stable, 2.0.33 sources as those are what most individuals and companies are now using.

 

This book is freely distributable, you may copy and redistribute it under certain conditions. Please refer to the copyright and distribution statement.

 

Version 0.8-3

David A Rusling

[email protected]

版权声明[10]

这本书是为那些想知道Linux内核是怎样工作的Linux狂热者写的。它不是一份内部手册,而是描述了Linux所使用的一些原理及机制:Linux内核是怎样工作的,以及为什么会这样工作的?

 

 

Linux在不断的发展着,这本书基于当前的,稳定的,2.0.33版源码,这个版本被现在的许多公司及个人使用。

 

 

这本书可以自由发布,你可以在限定条件下复制并重新发布它。请阅读版权声明及发行说明中的相应条款。

 

 

版本:0.8-3

David A Rusling

[email protected]

 

 

Preface

Linux is a phenomenon of the Internet. Born out of the hobby project of a student it has grown to become more popular than any other freely available operating system. Too many Linux is an enigma. How can something that is free be worthwhile? In a world dominated by a handful of large software corporations, how can something that has been written by a bunch of “hackers” (sic) hope to compete? How can software contributed to by many different people in many different countries around the world have a hope of being stable and effective? Yet stable and effective it is and compete it does. Many Universities and research establishments use it for their everyday computing needs. People are running it on their home PCs and I would wager that most companies are using it somewhere even if they do not always realize that they do. Linux is used to browse the web, host web sites, write theses, send electronic mail and, as always with computers, to play games. Linux is emphatically not a toy, it is a fully developed and professionally written operating system used by enthusiasts all over the world.

 

The roots of Linux can be traced back to the origins of Unix. In 1969, Ken Thompson of the Research Group at Bell Laboratories began experimenting on a multi-user, multi-tasking operating system using an otherwise idle PDP-7. He was soon joined by Dennis Richie and the two of them, along with other members of the Research Group produced the early versions of Unix. Richie was strongly influenced by an earlier project, MULTICS and the name Unix is itself a pun on the name MULTICS. Early versions were written in assembly code, but the third version was rewritten in a new programming language, C. C was designed and written by Richie expressly as a programming language for writing operating systems. This rewrite allowed Unix   to move onto the more powerful PDP-11/45 and 11/70 computers then being produced by DIGITAL. The rest, as they say, is history. Unix moved out of the laboratory and into mainstream computing and soon most major computer manufacturers were producing their own versions.

 

Linux was the solution to a simple need. The only software that Linus Torvalds, Linux's author and principle maintainer was able to afford was Minix. Minix is a simple, Unix like, operating system widely used as a teaching aid. Linus was less than impressed with its features, his solution was to write his own software. He took Unix as his model as that was an operating system that he was familiar with in his day to day student life. He started with an Intel 386 based PC and started to write. Progress was rapid and, excited by this, Linus offered his efforts to other students via the emerging world wide computer networks, then mainly used by the academic community. Others saw the software and started contributing. Much of this new software was itself the solution to a problem that one of the contributors had. Before long, Linux had become an operating system. It is important to note that Linux contains no Unix code, it is a rewrite based on published POSIX standards. Linux is built with and uses a lot of the GNU (GNU's Not Unix) software produced by the Free Software Foundation in Cambridge, Massachusetts.

 

Most people use Linux as a simple tool, often just installing one of the many good CD ROM-based distributions. A lot of Linux users use it to write applications or to run applications written by others. Many Linux users read the HOWTOs avidly and feel both the thrill of success when some part of the system has been correctly configured and the frustration of failure when it has not. A minority are bold enough to write device drivers and offer kernel patches to Linus Torvalds, the creator and maintainer of the Linux kernel. Linus accepts additions and modifications to the kernel sources from anyone, anywhere. This might sound like a recipe for anarchy but Linus exercises strict quality control and merges all new code into the kernel himself. At any one time though, there are only a handful of people contributing sources to the Linux kernel.

 

The majority of Linux users do not look at how the operating system works, how it fits together. This is a shame because looking at Linux is a very good way to learn more about how an operating system functions. Not only is it well written, all the sources are freely available for you to look at. This is because although the authors retain the copyrights to their software, they allow the sources to be freely redistributable under the Free Software Foundation's GNU Public License. At first glance though, the sources can be confusing; you will see directories called kernel, mm and net but what do they contain and how does that code work? What is needed is a broader understanding of the overall structure and aims of Linux. This, in short, is the aim of this book: to promote a clear understanding of how Linux, the operating system, works. To provide a mind model that allows you to picture what is happening within the system as you copy a file from one place to another or read electronic mail. I well remember the excitement that I felt when I first realized just how an operating system actually worked. It is that excitement that I want to pass on to the readers of this book.

 

My involvement with Linux started late in 1994 when I visited Jim Paradis who was working on a port of Linux to the Alpha AXP processor based systems. I had worked for Digital Equipment Co. Limited since 1984, mostly in networks and communications and in 1992 I started working for the newly formed Digital Semiconductor division. This division's goal was to enter fully into the merchant chip vendor market and sell chips, and in particular the Alpha AXP range of microprocessors but also Alpha AXP system boards outside of Digital. When I first heard about Linux I immediately saw an opportunity to have fun. Jim's enthusiasm was catching and I started to help on the port. As I worked on this, I began more and more to appreciate not only the operating system but also the community of engineers that produces it.

 

However, Alpha AXP is only one of the many hardware platforms that Linux runs on. Most Linux kernels are running on Intel processor based systems but a growing number of non-Intel Linux systems are becoming more commonly available. Amongst these are Alpha AXP, ARM, MIPS, Sparc and PowerPC. I could have written this book using any one of those platforms but my background and technical experiences with Linux are with Linux on the Alpha AXP and, to a lesser extent on the ARM. This is why this book sometimes uses non-Intel hardware as an example to illustrate some key point. It must be noted that around 95% of the Linux kernel sources are common to all of the hardware platforms that it runs on. Likewise, around 95% of this book is about the machine independent parts of the Linux kernel.

 

Reader Profile

This book does not make any assumptions about the knowledge or experience of the reader. I believe that interest in the subject matter will encourage a process of self education where necessary. That said, a degree of familiarity with computers, preferably the PC will help the reader derive real benefit from the material, as will some knowledge of the C programming language.

 

Organization of this Book

This book is not intended to be used as an internals manual for Linux. Instead it is an introduction to operating systems in general and to Linux in particular. The chapters each follow my rule of “working from the general to the particular”. They first give an overview of the kernel subsystem that they are describing before launching into its gory details.

 

I have deliberately not described the kernel's algorithms, its methods of doing things, in terms of routine_X() calls routine_Y() which increments the foo field of the bar data structure. You can read the code to find these things out. Whenever I need to understand a piece of code or describe it to someone else I often start with drawing its data structures on the white-board. So, I have described many of the relevant kernel data structures and their interrelationships in a fair amount of detail.

 

Each chapter is fairly independent, like the Linux kernel subsystem that they each describe. Sometimes, though, there are linkages; for example you cannot describe a process without understanding how virtual memory works.

 

The Hardware Basics chapter gives a brief introduction to the modern PC. An operating system has to work closely with the hardware system that acts as its foundations. The operating system needs certain services that can only be provided by the hardware. In order to fully understand the Linux operating system, you need to understand the basics of the underlying hardware.

 

The Software Basics chapter introduces basic software principles and looks at assembly and C programming languages. It looks at the tools that are used to build an operating system like Linux and it gives an overview of the aims and functions of an operating system.

 

The Memory Management chapter describes the way that Linux handles the physical and virtual memory in the system.

 

The Processes chapter describes what a process is and how the Linux kernel creates, manages and deletes the processes in the system.

 

Processes communicate with each other and with the kernel to coordinate their activities. Linux supports a number of Inter-Process Communication (IPC) mechanisms. Signals and pipes are two of them but Linux also supports the System V IPC mechanisms named after the Unix release in which they first appeared. These inter process communications mechanisms are described in Chapter IPC chapter.

 

The Peripheral Component Interconnect (PCI) standard is now firmly established as the low cost, high performance data bus for PCs. The PCI chapter describes how the Linux kernel initializes and uses PCI buses and devices in the system.

 

The Interrupts and Interrupt Handling chapter looks at how the Linux kernel handles interrupts. Whilst the kernel has generic mechanisms and interfaces for handling interrupts, some of the interrupt handling details are hardware and architecture specific.

 

One of Linux's strengths is its support for the many available hardware devices for the modern PC. The Device Drivers chapter describes how the Linux kernel controls the physical devices in the system.

 

The File system chapter describes how the Linux kernel maintains the files in the file systems that it supports. It describes the Virtual File System (VFS) and how the Linux kernel's real file systems are supported.

 

Networking and Linux are terms that are almost synonymous. In a very real sense Linux is a product of the Internet or World Wide Web (WWW). Its developers and users use the web to exchange information ideas, code and Linux itself is often used to support the networking needs of organizations. Chapter networks chapter describes how Linux supports the network protocols known collectively as TCP/IP.

 

The Kernel Mechanisms chapter looks at some of the general tasks and mechanisms that the Linux kernel needs to supply so that other parts of the kernel work effectively together.

 

The Modules chapter describes how the Linux kernel can dynamically load functions, for example file systems, only when they are needed.

 

The Processors chapter gives a brief description of some of the processors that Linux has been ported to.

 

The Sources chapter describes where in the Linux kernel sources you should start looking for particular kernel functions.

 

Conventions used in this Book

The following is a list of the typographical conventions used in this book.

serif font  identifies commands or other text that is to be typed literally by the user.

type font  refers to data structures or fields within data structures.

 

Throughout the text there references to pieces of code within the Linux kernel source tree (for example the boxed margin note adjacent to this text ). These are given in case you wish to look at the source code itself and all of the file references are relative to /usr/src/linux. Taking foo/bar.c as an example, the full filename would be /usr/src/linux/foo/bar.c If you are running Linux (and you should), then looking at the code is a worthwhile experience and you can use this book as an aid to understanding the code and as a guide to its many data structures.

 

 

The Author

I was born in 1957, a few weeks before Sputnik was launched, in the north of England. I first met Unix at University, where a lecturer used it as an example when teaching the notions of kernels, scheduling and other operating systems goodies. I loved using the newly delivered PDP-11 for my final year project. After graduating (in 1982 with a First Class Honours degree in Computer Science) I worked for Prime Computers (Primos) and then after a couple of years for Digital (VMS, Ultrix). At Digital I worked on many things but for the last 5 years there, I worked for the semiconductor group on Alpha and StrongARM evaluation boards. In 1998 I moved to ARM where I have a small group of engineers writing low level firmware and porting operating systems. My children (Esther and Stephen) describe me as a geek.

 

People often ask me about Linux at work and at home and I am only too happy to oblige. The more that I use Linux in both my professional and personal life the more that I become a Linux zealot. You may note that I use the term `zealot' and not `bigot'; I define a Linux zealot to be an enthusiast that recognizes that there are other operating systems but prefer not to use them. As my wife, Gill, who uses Windows 95 once remarked ``I never realized that we would have his and her operating systems''. For me, as an engineer, Linux suits my needs perfectly. It is a superb, flexible and adaptable engineering tool that I use at work and at home. Most freely available software easily builds on Linux and I can often simply download pre-built executable files or install them from a CD ROM. What else could I use to learn to program in C++, Perl or learn about Java for free?

 

Acknowledgements

I must thank the many people who have been kind enough to take the time to e-mail me with comments about this book. I have attempted to incorporate those comments in each new version that I have produced and I am more than happy to receive comments, however please note my new e-mail address.

 

A number of lecturers have written to me asking if they can use some or parts of this book in order to teach computing. My answer is an emphatic yes; this is one use of the book that I particularly wanted. Who knows, there may be another Linus Torvalds sat in the class.

 

Special thanks must go to John Rigby and Michael Bauer who gave me full, detailed review notes of the whole book. Not an easy task. Alan Cox and Stephen Tweedie have patiently answered my questions - thanks. I used Larry Ewing's penguins to brighten up the chapters a bit. Finally, thank you to Greg Hankins for accepting this book into the Linux Documentation Project and onto their web site.

前言

Linux是Internet的产物,从属于一个学生(Linus Torvalds)的个人爱好演变成为一个当今最流行的免费操作系统。对许多人而言,Linux似乎是个迷。一个免费的东西怎么会有价值?在一个被一群软件巨头统治的(系统)软件王国里,一个由一些电脑hackers编写的操作系统如何能够参与竞争?一个由不同的国家许多不同的人编写的软件如何能够保持其稳定性和高效性?这里的答案是Linux具有非常好的可靠性、高效性和竞争能力。许多大学和研究机构每天都在用Linux来做计算。许多人已在其PC上安装了Linux。而且我敢打赌,许多公司在很多地方都用到了Linux,不过他们并不总是认识到了这一点。Linux被广泛地用来浏览web站点,文件处理,发送email,玩计算机游戏。Linux绝不是一个计算机界的玩具,而是一个由全世界的爱好者开发的非常完善的,专业化的,并被全世界的狂热者使用的操作系统。

 

 

 

 

 

 

Linux的源头可以追溯到Unix家族。1969年,贝尔实验室的研究人员Ken Thompson开始在一台空闲的PDP-7机器上实验其多用户,多任务的操作系统。不久Dennis Richie和其他两位同事加入了他的行列。他们与实验室中的其他同事一道开发出了最早期的Unix版本。Richie在早期的项目MULTICS中发挥了很大的作用。Unix其实是MULTICS的双关语。早期的Unix是用汇编写的。第3版时采用了C语言。C语言是Richie设计并编写的,以用来作为编写操作系统设计的语言。用C改写过的Unix使得Unix可以被移植PDP-11/45和DIGITAL 11/70计算机上。后来发生的一切,正如他们所说,都成为了历史。Unix移植到DIGITAL 11/70是一个历史性的转折,使得Unix正式从实验室走向大型机计算环境。很快,绝大多数的计算机制造商都发布了其相应的Unix版本。

 

 

 

 

 

 

Linux诞生的原因极其简单。Linus Torvalds,Linux的作者和主要管理者,当时穷的只能够付的起Minix。Minix是一个非常简单,Unix风格的,被广泛用在教学上的操作系统。Linus对Minix的功能不是很满意(译者注:不知Andrew Tanenbaum看见这句话会有何感想。“后生可畏?”。有兴趣的读者可以访问Andrew的主页。)决定自己动手编写一个软件。因为在学校里每天用的都是Unix,所以他选择将Unix作为他的软件的模型。最开始的工作是在一台Intel 386的PC机上。他的进展很迅速。Linus对他所做的事情充满了兴趣,并通过刚刚出现的,还局限在学术领域的计算机网络,将已有的代码共享给其他的学生。其他的人看见了Linus的软件并开始加入开发的行列。不同的人由于在使用Linux时碰到不同的问题,所以这个软件也就不断地被更新和完善。不久之后,Linux就成为一个完整的操作系统了。值得注意的是Linux中没有任何Unix代码,而是根据POSIX标准重新编写的。Linux中使用了许多在Cambridge, Massachusetts的Free Software Foundation提供的GNU软件。

 

 

 

 

多数人仅把Linux 当成一个简单的工具来使用,通常只是安装众多优秀的Linux的CD-ROM发行版中的一种。也有许多用户在Linux上进行应用程序的开发或者运行其它用户写的程序。许多Linux用户积极的阅读HOWTOs,常常会因为成功的配置了系统的某一部份而兴奋,或者承受由失败带来的挫折感。只有很少数的人敢于为Linux写设备驱动程序和核心的patches(译者注:这个词不太好翻译),他们是Linux内核的创造者及维护者。 Linus Torvalds接受来自任何人、任何地方的关于核心的补充和修改。这似乎有点像无政府主义。不过Linus严把质量关,并由他自己将新的代码加入核心。当然,在任何时候,从事Linux核心开发的毕竟只是一少部份人。

 

 

 

 

大多数Linux用户似乎并不关心这个操作系统是如何构造和运行的。这不是个明智的决定,因为学习Linux是更好理解一个操作系统功能的有力途径。Linux不仅仅是设计的很好,更重要的是其源代码是公开的。这是因为虽然作者拥有这个软件的版权,但在Free Software Foundation's GNU Public License的基础上,源代码是可以免费获取的。对刚接触源码的人,起初,当看见一些叫做kernel、mm和net的子目录时,会觉得迷惑。它们含有些什么?这些代码是如何工作的?为了解决上述问题,我们需要的是对整个Linux的结构与目标有个总体的了解。这也正是本书的目的:提供一个关于Linux核心如何工作的清楚的画面。使你的脑海中可以建立起一种模型,当你从一个地方将文件复制到另一个地方的时候,或者当你阅读电子邮件的时候,这个模型能让你勾画出操作系统内部此时正在干什么的画面(译者注:这一点是为什么要鼓励应用程序开发者了解操作系统结构的原因。例如,不理解操作系统的调度,很难想象一个应用程序开发者可以编出一个高效的多线程并发程序)。我还对我第一次认识到操作系统是怎样工作时的激动情景记忆犹新。我想通过这本书把这种激动也带给我的读者。

 

(编者注:下面这段原译稿中没有,由编者补译)

我最早同Linux打交道是在1994年下半年。那时我拜访了Jim Paradis,他正在致力于将Linux系统移植到Alpha AXP下工作。在这之前,从1984年开始我在为DEC公司的网络与通信部门工作。1992年,我开始为新组建的数字半导体部门工作。这个部门的目标是充分进入商用芯片市场卖芯片,特别是Alpha AXP系列的微处理器,也包括Digital以外的Alpha AXP系统版卡。当我第一次听说Linux的时候,我就立即发现这是一个很有趣的机会(编者注:作者认为这是一个可以从中得到乐趣的机会)。Jim的狂热感染了我,我也开始帮助他做移植工作,随着越来越多的同它的接触,我也越来越欣赏这个操作系统,以及创造它的工程师们。

 

 

 

 

 

然而,Alpha AXP只是可以运行Linux的众多硬件平台中的一种。大部份的Linux内核运行在基于Intel处理器的系统上,当然,非Intel的Linux系统也越来越常见,比如Alpha AXP、ARM、MIPS、Sparc以及PowerPC。我可以基于上面的任何一个平台来写这本书,不过我的背景以及与Linux有关的技术经验更主要来源于Alpha AXP,其次是ARM。 这就是这本书时常用一些非Intel的硬件作为例子来解释一些重要观点的原因。然而95%的Linux核心源代码是与具体的硬件平台无关的。换而言之,本书95%的内容是讲述与硬件无关的Linux核心。

 

 

 

 

 

 

关于读者

本书不要求读者必须具备任何知识和经验的前提。我相信对这个主题感兴趣的读者在需要的时候,会努力的去自学一些相关知识。具备一定的计算机知识,尤其是PC机的知识,和C语言功底将帮助读者更好地理解本书。

 

 

 

 

本书的组织

本书并不是关于Linux内部的手册。它是关于通常意义上的操作系统,特别是对于Linux的介绍。每一章节按照从“普通到特殊”的规则来布局。首先在具体介绍细节之前,我们给出一个对核心子系统的综述。

 

 

 

 

关于核心的具体算法被特意地略去,这些算法大多是完成这些操作的具体方法。例如:routine_x()调用了routine_Y(),routine_Y()增加了bar这一结构体的foo域的值。你可以阅读源代码找到这些具体的操作方法。无论什么时候,只要我需要理解一段代码或者向另外一个人描述它,我会一开始就在白板上画出它的数据结构,因此本书也将重点放在核心数据结构和它们之间的关系上。

 

 

 

本书每一章都相对独立,就像每一个Linux子系统完成相对独立的功能一样。当然章节之间也是相关联的。例如,如果不理解虚拟内存是如何工作的,你就不能很好地描述一个进程。

 

硬件基础章节给出了一个对当代PC的简要介绍。一个操作系统必须工作在一个硬件基础上。操作系统中的某些功能是与硬件相关的。它需要的某些服务只能由硬件提供。为了理解Linux操作系统,读者需要具备一定的底层硬件知识。

 

 

 

 

软件基础章节介绍了基本的软件知识原理并论及了汇编和C语言。它们都是编写一个操作系统不可缺少的工具。另外本章给出了对操作系统的功能和目标的一个综述。

 

 

 

内存管理章节描述了Linux如何管理系统中的物理和虚拟内存。

 

 

进程章节描述了什么是一个进程,Linux核心如何创建、管理和删除系统中的进程。

 

 

 

进程之间、进程与核心之间通过通讯来调整或说安排它们的行为。Linux支持很多种进程间通讯——IPC(Inter Process Communication)机制。信号与管道是其中的两种。Linux还支持System V IPC机制,这一机制在Unix中首次出现,并在Unix被发行之后命名。关于IPC机制的内容在IPC章节描述。

 

 

外围组件互连(PCI)标准已经成为了PC机上一个低成本,高性能的PC数据总线标准。PCI章节讲述了Linux核心如何初始化和使用PCI总线和系统中的PCI设备。

 

 

 

中断和中断处理章节探讨了Linux核心如何处理中断。尽管操作系统核心里提供一些通用的机制和接口来处理中断,但一些关于中断处理的细节是与硬件体系结构有关的。

 

 

Linux的优点之一是它支持许多现代PC机上使用的硬件设备。设备驱动程序章节描述了Linux核心如何控制系统中的物理设备。

 

 

 

文件系统章节讲述了Linux核心如何维护其文件系统中的文件,描述了虚拟文件系统(VFS)和如何支持Linux核心中的真正文件系统。

 

 

网络与Linux几乎是一对同义词。从某种真实的意义上讲,Linux是Internet或World Wide Web(WWW)的产物。Linux的开发和使用者通过web来交换信息和代码。Linux也通常被用来支持机构的网络需求。网络章节描述了Linux如何支持TCP/IP协议族。

 

 

 

 

 

核心机制章节探讨了Linux核心需要支持或说完成的一些通用任务和机制,以用来使得核心其他部分有效地工作在一起。

 

 

模块章节讲述了Linux如何只在需要的时候动态地装载功能模块,例如文件系统。

 

 

(下段原译稿没有,由编者补译)

处理器章节简要的描述了一些已经移植了Linux的处理器。

 

 

源代码章节描述了对应于特定的核心功能的Linux核心源代码地址。读者可以依据本章的介绍来开始阅读源代码。

 

 

本书的约定

 

下面是一些本书在排版上的约定:

 

serif font:用户必须输入的命令或文本。

 

type font:数据结构和数据结构中的域。

 

 

在全书的正文中,引用了Linux内核源代码树中的部分代码(比如,出现在正文空白处的小框)(编者注:原书正文的空白部份有不少小框标明了此处所描述的内容出现在哪个源文件中)这是给你机会,希望你能自己阅读源码。本书中所引用的源程序都基于相对路径/usr/src/linux。如foo/bar.c,则其实际的含路径的完整文件名是/usr/src/linux/foo/bar.c。如果你正在运行Linux(你应当这样做),那么阅读源代码是非常有价值的,你可以把这本书当作你理解源代码及众多数据结构的助手和相导。

 

(编者注:以下一节原译稿中没有,由编者补译)

作者介绍

1957年,在苏联人造卫星发射升空的几周前,我出生在英格兰北部。我第一次接触Unix是在大学里,当时有位老师在讲解内核概念,调度概念及其它操作系统产品的时候,用它做了一个例子。在最后一年里,我用最新的PDP-11完成了项目的开发。毕业后(1982年,计算机科学一级荣誉学位)(编者注:抱歉,对于作者所获得学位的准确称谓,实在没有能力准确把握),我开始为Prim Computers(Primos)工作,两年后,加入Digital(VMS,Ultrix)。在Digital,我从事过多项工作,不过在Digital的最后5年,被调入开发Alpha及StrongARM测试板的半导体组。1998年,我来到ARM,在这里,我领导一小组工程师在编写底层的固件及移植操作系统。我的孩子(Esther与Stephen)常说我是一个很滑稽的人。

 

 

 

有人经常在工作及生活中,问我一些关于Linux的问题,我常常乐极而忘言谢。在我的职业及生活中用Linux越多,我也越来越多的成为一个Linux的狂热者。你必须注意到,我用的是“狂热者”而不是“顽固者”。我认为一个Linux狂热者一定是这样的一个人,他知道还有很多其它的操作系统,但却不愿意使用它们。作为一个Windows 95用户,我的妻子,Gill,曾经提及:“我从来没有想到我会用到他或她的操作系统。”(编者注:包歉,对于Gill这句话的意思,实在没有能力准确把握)对于我来说,作为一个工程师,Linux最能满足我的需要。它是一个我在工作及生活中使用的极妙的、灵活的、可修改的技术工具。非常多的免费的好用的软件可以很容易的在Linux上安装。我常常下载一些未安装的可执行文件或者从CD-ROM中安装它们。还有什么可以被用来免费学习C++、Perl或者Java呢?

 

(编者注:这节原译稿也没有,由编者补译)

致谢

我必须感谢许多人,他们不惜花费时间,把他们对这本书的意见和建议,通过电子邮件的方式告诉我。我正尝试将所有的评论合并到一个新版本中。我也非常高兴能收到更多的评论,不过,请注意我的新邮件地址。

 

 

 

很多教师写信向我询问他们是否可以将这本书中的一些章节用于教学目的。我的回答是非常肯定的。这是我特别期待的一种用途。谁能知道,这些课堂上会不会坐着另一个Linus Torvalds呢?

 

 

要特别感谢John Rigby与Michael Bauer,他们全面而细致的审阅了此书——这不是一件轻松的工作。非常感谢Alan Cox与Stephen Tweedie对我的问题的耐心解答!Larry Ewing的企鹅让这本书增色不少。最后,感谢Greg将该书列入LDP(Linux 文档计划)并将该书发布在他们的网站上。

【未完待续·责任编辑:iamxiaohan@hitbbs】

 

[1] 电子邮件:[email protected]

[2] 由于无法取得所有作者现在的真实情况,所有作者介绍均来自作者翻译时的前注。

[3] 毕业于美国Purdue 大学, 获MS学位。现供职于美国GTE公司。电子邮件:[email protected]

[4] 现为美国Carnegie Mellon大学计算机系Ph.D Student。电子邮件:[email protected]

[5] 现为美国Yale 大学 Ph.D。电子邮件:[email protected]

[6] 现任职于Lode Soft公 司,南京。电子邮件:[email protected]

[7] 现为美国Wayne State Univ.Assistant Professor。电子邮件:[email protected]

[8] 现为美国DartMouth College Ph.D Candidate。电子邮件:[email protected]

[9] 美国硅谷软件工程师。电子邮件:[email protected]

[10] 此节原译稿没有,为编者补译

本文地址:http://com.8s8s.com/it/it33087.htm