深入理解Linux内核(第三版)(英文影印版)(逐行向读者剖析相关的代码片段)
基本信息
- 作者: Daniel P.Bovet,Marco Cesati
- 丛书名: 东南大学出版社O'REILLY图书系列
- 出版社:东南大学出版社
- ISBN:7564102764
- 上架时间:2006-3-28
- 出版日期:2006 年3月
- 开本:16开
- 页码:944
- 版次:3-1
- 所属分类:
计算机 > 操作系统 > Linux
编辑推荐
本书第2版有良好销售,并获得一致好评,可惜已经绝版。《深入理解Linux内核,第三版》指导你对内核中使用的最重要的数据结构、算法和程序设计诀窍进行一次遍历。通过对表面特性的探究,作者给那些想知道自己机器工作原理的人提供了颇有价值的见解。书中讨论了Intel特有的重要性质。相关的代码片段被逐行剖析。然而,本书涵盖的不仅仅是代码的功能,它解释了Linux以自己的方式工作的理论基础。
推荐阅读
内容简介回到顶部↑
为了彻底理解是什么使得linux能正常运行以及其为何能在各种不同的系统中运行良好,你需要深入研究内核最本质的部分。内核处理cpu与外界间的所有交互,并且决定哪些程序将以什么顺序共享处理器时间。它如此有效地管理有限的内存,以至成百上千的进程能高效地共享系统。它熟练地统筹数据传输,这样cpu不用为等待速度相对较慢的硬盘而消耗比正常耗时更长的时间。
《深入理解linux内核,第三版》指导你对内核中使用的最重要的数据结构、算法和程序设计诀窍进行一次遍历。通过对表面特性的探究,作者给那些想知道自己机器工作原理的人提供了颇有价值的见解。书中讨论了intel特有的重要性质。相关的代码片段被逐行剖析。然而,本书涵盖的不仅仅是代码的功能,它解释了linux以自己的方式工作的理论基础。
本书新版涵盖2.6版本,其在内核的几乎每个子系统中都有重要的变化,尤其是在内存管理和块设备领域。本书侧重于以下主题:
·内存管理,包括文件缓存、进程交换和直接内存存取(dma)
·虚拟文件系统层和第二、第三扩展文件系统
·进程创建和调度
·信号、中断和设备驱动程序的主要接口
·定时
·内核中的同步
·进程间通信(ipc)
·程序的执行
《深入理解linux内核》将使你了解linux的所有内部工作,它不仅仅是一个理论上的练习。你将学习到哪些情况下linux性能最佳,并且你将看到,在大量的不同环境里进行进程调度、文件存取和内存管理时,它如何满足提供良好的系统响应的需要。这本书将帮助你充分利用linux系统。
《深入理解linux内核,第三版》指导你对内核中使用的最重要的数据结构、算法和程序设计诀窍进行一次遍历。通过对表面特性的探究,作者给那些想知道自己机器工作原理的人提供了颇有价值的见解。书中讨论了intel特有的重要性质。相关的代码片段被逐行剖析。然而,本书涵盖的不仅仅是代码的功能,它解释了linux以自己的方式工作的理论基础。
本书新版涵盖2.6版本,其在内核的几乎每个子系统中都有重要的变化,尤其是在内存管理和块设备领域。本书侧重于以下主题:
·内存管理,包括文件缓存、进程交换和直接内存存取(dma)
·虚拟文件系统层和第二、第三扩展文件系统
·进程创建和调度
·信号、中断和设备驱动程序的主要接口
·定时
·内核中的同步
·进程间通信(ipc)
·程序的执行
《深入理解linux内核》将使你了解linux的所有内部工作,它不仅仅是一个理论上的练习。你将学习到哪些情况下linux性能最佳,并且你将看到,在大量的不同环境里进行进程调度、文件存取和内存管理时,它如何满足提供良好的系统响应的需要。这本书将帮助你充分利用linux系统。
目录回到顶部↑
preface .
1. introduction
linux versus other unix-like kernels
hardware dependency
linux versions
basic operating system concepts
an overview of the unix filesystem
an overview of unix kernels
2. memory addressing
memory addresses
segmentation in hardware
segmentation in linux
paging in hardware
paging in linux
3. processes
processes, lightweight processes, and threads
process descriptor
process switch
creating processes
destroying processes
1. introduction
linux versus other unix-like kernels
hardware dependency
linux versions
basic operating system concepts
an overview of the unix filesystem
an overview of unix kernels
2. memory addressing
memory addresses
segmentation in hardware
segmentation in linux
paging in hardware
paging in linux
3. processes
processes, lightweight processes, and threads
process descriptor
process switch
creating processes
destroying processes
前言回到顶部↑
In the spring semester of 1997, we taught a course on operating systems based on Linux 2.0. The idea was to encourage students to read the source code. To achieve this, we assigned term projects consisting of making changes to the kernel and performing tests on the modified version. We also wrote course notes for our students about a few critical features of Linux such as task switching and task scheduling. .
Out of this work—and with a lot of support from our O'Reilly editor Andy Oram— came the first edition of Understanding the Linux Kernel at the end of 2000, which covered Linux 2.2 with a few anticipations on Linux 2.4. The success encountered by this book encouraged us to continue along this line. At the end of 2002, we came out with a second edition covering Linux 2.4. You are now looking at the third edition, which covers Linux 2.6.
As in our previous experiences, we read thousands of lines of code, trying to make sense of them. After all this work, we can say that it was worth the effort. We learned a lot of things you don't find in books, and we hope we have succeeded in conveying some of this information in the following pages.
The Audience for This Book
All people curious about how Linux works and why it is so efficient will find answers here. After reading the book, you will find your way through the many thousands of lines of code, distinguishing between crucial data structures and secondary ones—in short, becoming a true Linux hacker.
Our work might be considered a guided tour of the Linux kernel: most of the significant data structures and many algorithms and programming tricks used in the kernel are discussed. In many cases, the relevant fragments of code are discussed line by line. Of course, you should have the Linux source code on hand and should be willing to expend some effort deciphering some of the functions that are not, for sake of brevity, fully described.
On another level, the book provides valuable insight to people who want to know more about the critical design issues in a modern operating system. It is not specifically addressed to system administrators or programmers; it is mostly for people who want to understand how things really work inside the machine! As with any good guide, we try to go beyond superficial features. We offer a background, such as the history of major features and the reasons why they were used.
Organization Of the Material
When we began to write this book, we were faced with a critical decision: should we refer to a specific hardware platform or skip the hardware-dependent details and concentrate on the pure hardware-independent parts of the kernel? Others books on Linux kernel internals have chosen the latter approach; we decided to adopt the former one for the following reasons:
● Efficient kernels take advantage of most available hardware features, such as addressing techniques, caches, processor exceptions, special instructions, processor control registers, and so on. If we want to convince you that the kernel indeed does quite a good job in performing a specific task, we must first tell what kind of support comes from the hardware.
● Even if a large portion of a Unix kernel source code is processor-independent and coded in C language, a small and critical part is coded in assembly language. A thorough knowledge of the kernel, therefore, requires the study of a few assembly language fragments that interact with the hardware.
When covering hardware features, our strategy is quite simple: only sketch the features that are totally hardware-driven while detailing those that need some software support. In fact, we are interested in kernel design rather than in computer architecture.
Our next step in choosing our path consisted of selecting the computer system to describe. Although Linux is now running on several kinds of personal computers and workstations, we decided to concentrate on the very popular and cheap IBM-compatible personal computers—and thus on the 80x86 microprocessors and on some sup- port chips included in these personal computers. The term 80 x 86 microprocessor will be used in the forthcoming chapters to denote the Intel 80386, 80486, Pentium, Pentium Pro, Pentium II, Pentium III, and Pentium 4 microprocessors or compatible models. In a few cases, explicit references will be made to specific models.
One more choice we had to make was the order to follow in studying Linux components. We tried a bottom-up approach: start with topics that are hardware- dependent and end with those that are totally hardware-independent. In fact, we'll make many references to the 80x86 microprocessors in the first part of the book, while the rest of it is relatively hardware-independent. Significant exceptions are made in Chapter 13 and Chapter 14. In practice, following a bottom-up approach is not as simple as it looks, because the areas of memory management, process management, and filesystems are intertwined; a few forward references—that is, references to topics yet to be explained—are unavoidable. Each chapter starts with a theoretical overview of the topics covered. The material is then presented according to the bottom-up approach. We start with the data structures needed to support the functionalities described in the chapter. Then we usually move from the lowest level of functions to higher levels, often ending by showing how system calls issued by user applications are supported.
Level of Description
Linux source code for all supported architectures is contained in more than 14,000 C and assembly language files stored in about 1000 subdirectories; it consists of roughly 6 million lines of code, which occupy over 230 megabytes of disk space. Of course, this book can cover only a very small portion of that code. Just to figure out how big the Linux source is, consider that the whole source code of the book you are reading occupies less than 3 megabytes. Therefore, we would need more than 75 books like this to list all code, without even commenting on it!
So we had to make some choices about the parts to describe. This is a rough assess- ment of our decisions:
● We describe process and memory management fairly thoroughly. ..
● We cover the Virtual Filesystem and the Ext2 and Ext3 filesystems, although many functions are just mentioned without detailing the code; we do not discuss other filesystems supported by Linux.
● We describe device drivers, which account for roughly 50% of the kernel, as far as the kernel interface is concerned, but do not attempt analysis of each specific driver.
Out of this work—and with a lot of support from our O'Reilly editor Andy Oram— came the first edition of Understanding the Linux Kernel at the end of 2000, which covered Linux 2.2 with a few anticipations on Linux 2.4. The success encountered by this book encouraged us to continue along this line. At the end of 2002, we came out with a second edition covering Linux 2.4. You are now looking at the third edition, which covers Linux 2.6.
As in our previous experiences, we read thousands of lines of code, trying to make sense of them. After all this work, we can say that it was worth the effort. We learned a lot of things you don't find in books, and we hope we have succeeded in conveying some of this information in the following pages.
The Audience for This Book
All people curious about how Linux works and why it is so efficient will find answers here. After reading the book, you will find your way through the many thousands of lines of code, distinguishing between crucial data structures and secondary ones—in short, becoming a true Linux hacker.
Our work might be considered a guided tour of the Linux kernel: most of the significant data structures and many algorithms and programming tricks used in the kernel are discussed. In many cases, the relevant fragments of code are discussed line by line. Of course, you should have the Linux source code on hand and should be willing to expend some effort deciphering some of the functions that are not, for sake of brevity, fully described.
On another level, the book provides valuable insight to people who want to know more about the critical design issues in a modern operating system. It is not specifically addressed to system administrators or programmers; it is mostly for people who want to understand how things really work inside the machine! As with any good guide, we try to go beyond superficial features. We offer a background, such as the history of major features and the reasons why they were used.
Organization Of the Material
When we began to write this book, we were faced with a critical decision: should we refer to a specific hardware platform or skip the hardware-dependent details and concentrate on the pure hardware-independent parts of the kernel? Others books on Linux kernel internals have chosen the latter approach; we decided to adopt the former one for the following reasons:
● Efficient kernels take advantage of most available hardware features, such as addressing techniques, caches, processor exceptions, special instructions, processor control registers, and so on. If we want to convince you that the kernel indeed does quite a good job in performing a specific task, we must first tell what kind of support comes from the hardware.
● Even if a large portion of a Unix kernel source code is processor-independent and coded in C language, a small and critical part is coded in assembly language. A thorough knowledge of the kernel, therefore, requires the study of a few assembly language fragments that interact with the hardware.
When covering hardware features, our strategy is quite simple: only sketch the features that are totally hardware-driven while detailing those that need some software support. In fact, we are interested in kernel design rather than in computer architecture.
Our next step in choosing our path consisted of selecting the computer system to describe. Although Linux is now running on several kinds of personal computers and workstations, we decided to concentrate on the very popular and cheap IBM-compatible personal computers—and thus on the 80x86 microprocessors and on some sup- port chips included in these personal computers. The term 80 x 86 microprocessor will be used in the forthcoming chapters to denote the Intel 80386, 80486, Pentium, Pentium Pro, Pentium II, Pentium III, and Pentium 4 microprocessors or compatible models. In a few cases, explicit references will be made to specific models.
One more choice we had to make was the order to follow in studying Linux components. We tried a bottom-up approach: start with topics that are hardware- dependent and end with those that are totally hardware-independent. In fact, we'll make many references to the 80x86 microprocessors in the first part of the book, while the rest of it is relatively hardware-independent. Significant exceptions are made in Chapter 13 and Chapter 14. In practice, following a bottom-up approach is not as simple as it looks, because the areas of memory management, process management, and filesystems are intertwined; a few forward references—that is, references to topics yet to be explained—are unavoidable. Each chapter starts with a theoretical overview of the topics covered. The material is then presented according to the bottom-up approach. We start with the data structures needed to support the functionalities described in the chapter. Then we usually move from the lowest level of functions to higher levels, often ending by showing how system calls issued by user applications are supported.
Level of Description
Linux source code for all supported architectures is contained in more than 14,000 C and assembly language files stored in about 1000 subdirectories; it consists of roughly 6 million lines of code, which occupy over 230 megabytes of disk space. Of course, this book can cover only a very small portion of that code. Just to figure out how big the Linux source is, consider that the whole source code of the book you are reading occupies less than 3 megabytes. Therefore, we would need more than 75 books like this to list all code, without even commenting on it!
So we had to make some choices about the parts to describe. This is a rough assess- ment of our decisions:
● We describe process and memory management fairly thoroughly. ..
● We cover the Virtual Filesystem and the Ext2 and Ext3 filesystems, although many functions are just mentioned without detailing the code; we do not discuss other filesystems supported by Linux.
● We describe device drivers, which account for roughly 50% of the kernel, as far as the kernel interface is concerned, but do not attempt analysis of each specific driver.
评论交流
共有145人开贴评论 226人参与评论 119人参与打分 查看
评价等级:







发表于:2008-6-13 11:27:00
看E书的朋友:
这本书不适合看E文.理由有下:
1.这本书太好了--内容太精彩了
2.这本书的装订质量上等
3.这本书相当的厚,
4.这本书相当的深,不前后联系,不能看透
5.这本书有每个函数的对应文件列表,非常容易便于源代码进一步探秘
6.上述优点对得住她的价格
7.看E书,伤眼睛,不能连续看10个小时,后续效率不高,
8.看E书,每看1小时,要花费2~3角,由于效率没有看纸质书籍高,全部看下来得花很多时间,100个小时保证看不下来,400个小时估计也不行,如此来看,得花费70~80元,而且更不好的是,以后每次看,都得花钱.而纸质书籍时间越久,每小时成本越便宜.
9.电子图书容易做笔记(使用pdf格式能够做注记),但容易丢失(以后又下载了同样的书籍,原先的有注记版本的就丢了)
我的习惯:
看到了好书,先看E文,看两章左右.觉得很好,再到网站搜索版本
如果装订不错,价格合理,评论很好,就买下来
如果装订不好,翻译不好,对不起,我去打印(打印的纸张都很好,最起码厚)
我这样的习惯,对于很好的书籍,并不损害其著作者的利益.
也希望大家都这样.
呵呵,给出版商一定的压力,好书就要装订好点,价格定好点
另外,在中国,大多数人都买不起四五百一本的原版书,希望出版社多引进优秀的外文计算机书籍,要影印版本的,不要原版本的,要装订好的,价格不要超过100
这本书不适合看E文.理由有下:
1.这本书太好了--内容太精彩了
2.这本书的装订质量上等
3.这本书相当的厚,
4.这本书相当的深,不前后联系,不能看透
5.这本书有每个函数的对应文件列表,非常容易便于源代码进一步探秘
6.上述优点对得住她的价格
7.看E书,伤眼睛,不能连续看10个小时,后续效率不高,
8.看E书,每看1小时,要花费2~3角,由于效率没有看纸质书籍高,全部看下来得花很多时间,100个小时保证看不下来,400个小时估计也不行,如此来看,得花费70~80元,而且更不好的是,以后每次看,都得花钱.而纸质书籍时间越久,每小时成本越便宜.
9.电子图书容易做笔记(使用pdf格式能够做注记),但容易丢失(以后又下载了同样的书籍,原先的有注记版本的就丢了)
我的习惯:
看到了好书,先看E文,看两章左右.觉得很好,再到网站搜索版本
如果装订不错,价格合理,评论很好,就买下来
如果装订不好,翻译不好,对不起,我去打印(打印的纸张都很好,最起码厚)
我这样的习惯,对于很好的书籍,并不损害其著作者的利益.
也希望大家都这样.
呵呵,给出版商一定的压力,好书就要装订好点,价格定好点
另外,在中国,大多数人都买不起四五百一本的原版书,希望出版社多引进优秀的外文计算机书籍,要影印版本的,不要原版本的,要装订好的,价格不要超过100
| 我要写评论 |
| 查看所有评论交流(共145条) |








点击看大图



加载中...


