经典书籍翻译——深入理解Linux内核3

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.

关于如何组织材料
当我们开始着手写作本书时,我们面临一个关键的抉择:我们是要限定一个特定的硬件平台进行讨论还是跳过那些依赖于硬件平台的细节并将精力集中在独立于硬件平台纯粹内核部分?市面上其他剖析Linux内核构件的书籍选择了后者,而我们决定采用前者则出于以下原因:

  1. 运行高效的内核都能将大多数可用的硬件特性发挥出来,比如:寻址技术、高速缓存、处理器异常、特定指令、处理器控制寄存器等。在在一个特定进程运行过程中内核也的确发挥了非常好的效能,为了使这一点更有信服力,我们必须首先交代清楚硬件提供了怎样的支持。
    2.尽Unix内核源码很大一部分是用独立于处理器的C语言写就的,依然有少部分关键代码用的是汇编语言。为了彻底的弄懂内核机制,我们就需要学习一部分汇编语言片段来和硬件平台进行交互。

猜你喜欢

转载自blog.csdn.net/m0_37546257/article/details/121177381