Linux内核编程必读(英文影印版)
[特价中]基本信息
内容简介回到顶部↑
本书是一本linux内核编程的权威指南,其独特的由表及里学习途径使得内核编程更易于理解。本书从用户空间到内核,把内核内在的实现原理与用户级编程的基本原则相联系,系统地跟踪了实现功能。这种途径有助于在你所了解的linux知识基础上,加深对内核组成及工作机理的理解。 .
为了理解内核代码并掌控其行为,作者逐步引入所有的工具和汇编语言编程技术,并一一比较x86和powerpc的实现,揭示了含糊不清的实现功能。另外,书中对源代码例子和实际项目都加有适当注释。本书是第一本全面涵盖快速增长的powerpc linux开发平台的书,也是惟一一本用linux构建系统彻底讨论内核配置的书。 ..
本书主要内容
● 数据结构
● x86和ppc汇编语言
● 查看内核内部状态
● linux进程模型
● 用户空间和内核空间
● 中断和异常
● 内存分配和跟踪
● 跟踪子系统行为
● i/o交互
● 文件系统和文件操作
● 调度和同步
● 内核启动过程
● 内核构建过程
● 配置选项
● 设备驱动程序
本书介绍了linux内核编程需要的所有技巧和技术,无论对于系统程序员、软件工程师、系统分析员、测试人员还是linux的热衷者来说,都是不可或缺的参考书。...
为了理解内核代码并掌控其行为,作者逐步引入所有的工具和汇编语言编程技术,并一一比较x86和powerpc的实现,揭示了含糊不清的实现功能。另外,书中对源代码例子和实际项目都加有适当注释。本书是第一本全面涵盖快速增长的powerpc linux开发平台的书,也是惟一一本用linux构建系统彻底讨论内核配置的书。 ..
本书主要内容
● 数据结构
● x86和ppc汇编语言
● 查看内核内部状态
● linux进程模型
● 用户空间和内核空间
● 中断和异常
● 内存分配和跟踪
● 跟踪子系统行为
● i/o交互
● 文件系统和文件操作
● 调度和同步
● 内核启动过程
● 内核构建过程
● 配置选项
● 设备驱动程序
本书介绍了linux内核编程需要的所有技巧和技术,无论对于系统程序员、软件工程师、系统分析员、测试人员还是linux的热衷者来说,都是不可或缺的参考书。...
作译者回到顶部↑
本书提供作译者介绍
Claudia Salzberg Rodriguez就职于IBM Linux技术中心,进行内核及相关编程工具的开发。她做了5年多Linux系统程序员,针对Intel和PPC平台,进行嵌入式到高性能系统的Linux开发。 .
Gordon Fischer 为很多低级设备开发了Linux和UNIX设备驱动程序,并针对Intel和PPC平台,在各种各样的企业级设置中使用Linux内核。.. Steven Smolski 在制造、测试以及内存、处理器和ASICS的研发等半导体行业工作了26年,他为Linux、AIX、Windows以及嵌入式操作系统都写过应用程序和驱动程序。 ...
.. << 查看详细
Gordon Fischer 为很多低级设备开发了Linux和UNIX设备驱动程序,并针对Intel和PPC平台,在各种各样的企业级设置中使用Linux内核。.. Steven Smolski 在制造、测试以及内存、处理器和ASICS的研发等半导体行业工作了26年,他为Linux、AIX、Windows以及嵌入式操作系统都写过应用程序和驱动程序。 ...
.. << 查看详细
目录回到顶部↑
foreword.
acknowledgments
about the authors
preface
chapter 1 overview
1.1 history of unix
1.2 standards and common interfaces
1.3 free software and open source
1.4 a quick survey of linux distributions
1.5 kernel release information
1.6 linux on power
1.7 what is an operating system?
1.8 kernel organization
1.9 overview of the linux kernel
1.10 portability and architecture dependence
summary
exercises
chapter 2 exploration toolkit
2.1 common kernel datatypes
2.2 assembly
acknowledgments
about the authors
preface
chapter 1 overview
1.1 history of unix
1.2 standards and common interfaces
1.3 free software and open source
1.4 a quick survey of linux distributions
1.5 kernel release information
1.6 linux on power
1.7 what is an operating system?
1.8 kernel organization
1.9 overview of the linux kernel
1.10 portability and architecture dependence
summary
exercises
chapter 2 exploration toolkit
2.1 common kernel datatypes
2.2 assembly
前言回到顶部↑
Technology in general and computers in specific have a magical allure that seems to consume those who would approach them. Developments in technology push established boundaries and force the re-evaluation of troublesome concepts previously laid to rest. The Linux operating system has been a large contributor to a torrent of notable shifts in industry and the way business is done. By its adoption of the GNU Public License and its interactions with GNU software, it has served as a cornerstone to the various debates that surround open source, free software, and the concept of the development community. Linux is an extremely successful example of how powerful an open source operating system can be, and how the magic of its underpinnings can hold programmers from all corners of the world spellbound. .
The use of Linux is something that is increasingly accessible to most computer users. With multiple distributions, community support, and industry backing, the use of Linux has also found safe harbor in universities, industrial applications, and the homes of millions of users.
Increased need in support and for new functionality follow at the heels of this upsurge in use. In turn, more and more programmers are finding themselves interested in the internals of the Linux kernel as the number of architectures and devices that demand support are added to the already vast (and rapidly growing) arsenal.
The porting of the Linux kernel to the Power architecture has contributed to the operating system's blossoming among high-end servers and embedded systems. The need for understanding how Linux runs on the Power architecture has grown, with companies now purchasing PowerPC-based systems intended to run Linux.
Intended Audience
This book is intended for the budding and veteran systems programmer, the Linux enthusiast, and the application programmer eager to have a better underStanding of what makes his programs work the way they do. Anyone who has knowledge of C, familiarity with basic Linux user fundamentals, and wants to know how Linux works should find this book provides him with the basic concepts necessary to build this understandingwit is intended to be a primer for understanding how the Linux kernel works.
Whether your experience with Linux has been logging in and writing small programs to run on Linux, or you are an established systems programmer seeking to understand particularities of one of the subsystems, this book provides you with the nformation you are looking for.
Organization of Material
This book is divided into three parts, each of which provides the reader with Knowledge necessary to succeed in the study of Linux internals.
Part I provides the necessary tools and understanding to tackle the' exploration of the kernel internals:
Chapter 1, "Overview," provides a history of Linux and UNIX, a listing of the many distributions, and a short overview of the various kernel subsystems from a uet, r space perspective.
Chapter 2, "Exploration Toolkit," provides a description of the data structures and language usage commonly found throughout the Linux kernel, an introduction to assembly for x86 and PowerPC architectures, and a summary of tools and utilities used to get the information needed to understand kernel internals. ..
Part II introduces the reader to the basic concepts in each kernel subsystem and to trace the code that executes the subsystem functionality:
Chapter 3, "Processes: The Principal Model of Execution," covers the implementation of the process model. We explain how processes come to be and discuss the flow of control of a user space process into kernel space and back. We also discuss how processes are implemented in the kernel and discuss all data structures associated with process execution. This chapter also covers interrupts and exceptions, how these hardware mechanisms occur in each of the architectures, and how they interact with the Linux kernel.
Chapter 4, "Memory Management," describes how the Linux kernel tracks and manages available memory among various user space processes and the kernel. This chapter describes the way in which the kernel categorizes memory and how it decides to allocate and deallocate memory. It also describes in detail the mechanism of the page fault and how it is executed in the hardware.
Chapter 5, "Input/Output," describes how the processor interacts with other devices, and how the kernel interfaces and controls these interactions. This chapter also covers various kinds of devices and their implementation in the kernel.
Chapter 6, "Filesystems," provides an overview of how files and directories are implemented in the kernel. This chapter introduces the virtual filesystem, the layer of abstraction used to support multiple filesystems. This chapter also traces the execution of file-related operations such as open and close.
Chapter 7, "Scheduling and Kernel Synchronization," describes the operation of the scheduler, which allows multiple' processes to run as though they are the only process in the system. This chapter covers in detail how the kernel selects which task to execute and how it interfaces with the hardware to switch from one process to another. This chapter also describes what kernel preemption is and how it is executed. Finally, it describes how the system clock works and its use by the kernel to keep time.
Chapter 8, "Booting the Kernel," describes what happens from Power On to Power Off. It traces how the various processors handle the loading of the kernel, including a description of BIOS, Open Firmware, and bootloaders. This chapter then goes through the linear order in kernel bringup and initialization, covering all the subsystems discussed in previous chapters.
Part III deals with a more hands-on approach to building and interacting with the Lirmx kernel:
The use of Linux is something that is increasingly accessible to most computer users. With multiple distributions, community support, and industry backing, the use of Linux has also found safe harbor in universities, industrial applications, and the homes of millions of users.
Increased need in support and for new functionality follow at the heels of this upsurge in use. In turn, more and more programmers are finding themselves interested in the internals of the Linux kernel as the number of architectures and devices that demand support are added to the already vast (and rapidly growing) arsenal.
The porting of the Linux kernel to the Power architecture has contributed to the operating system's blossoming among high-end servers and embedded systems. The need for understanding how Linux runs on the Power architecture has grown, with companies now purchasing PowerPC-based systems intended to run Linux.
Intended Audience
This book is intended for the budding and veteran systems programmer, the Linux enthusiast, and the application programmer eager to have a better underStanding of what makes his programs work the way they do. Anyone who has knowledge of C, familiarity with basic Linux user fundamentals, and wants to know how Linux works should find this book provides him with the basic concepts necessary to build this understandingwit is intended to be a primer for understanding how the Linux kernel works.
Whether your experience with Linux has been logging in and writing small programs to run on Linux, or you are an established systems programmer seeking to understand particularities of one of the subsystems, this book provides you with the nformation you are looking for.
Organization of Material
This book is divided into three parts, each of which provides the reader with Knowledge necessary to succeed in the study of Linux internals.
Part I provides the necessary tools and understanding to tackle the' exploration of the kernel internals:
Chapter 1, "Overview," provides a history of Linux and UNIX, a listing of the many distributions, and a short overview of the various kernel subsystems from a uet, r space perspective.
Chapter 2, "Exploration Toolkit," provides a description of the data structures and language usage commonly found throughout the Linux kernel, an introduction to assembly for x86 and PowerPC architectures, and a summary of tools and utilities used to get the information needed to understand kernel internals. ..
Part II introduces the reader to the basic concepts in each kernel subsystem and to trace the code that executes the subsystem functionality:
Chapter 3, "Processes: The Principal Model of Execution," covers the implementation of the process model. We explain how processes come to be and discuss the flow of control of a user space process into kernel space and back. We also discuss how processes are implemented in the kernel and discuss all data structures associated with process execution. This chapter also covers interrupts and exceptions, how these hardware mechanisms occur in each of the architectures, and how they interact with the Linux kernel.
Chapter 4, "Memory Management," describes how the Linux kernel tracks and manages available memory among various user space processes and the kernel. This chapter describes the way in which the kernel categorizes memory and how it decides to allocate and deallocate memory. It also describes in detail the mechanism of the page fault and how it is executed in the hardware.
Chapter 5, "Input/Output," describes how the processor interacts with other devices, and how the kernel interfaces and controls these interactions. This chapter also covers various kinds of devices and their implementation in the kernel.
Chapter 6, "Filesystems," provides an overview of how files and directories are implemented in the kernel. This chapter introduces the virtual filesystem, the layer of abstraction used to support multiple filesystems. This chapter also traces the execution of file-related operations such as open and close.
Chapter 7, "Scheduling and Kernel Synchronization," describes the operation of the scheduler, which allows multiple' processes to run as though they are the only process in the system. This chapter covers in detail how the kernel selects which task to execute and how it interfaces with the hardware to switch from one process to another. This chapter also describes what kernel preemption is and how it is executed. Finally, it describes how the system clock works and its use by the kernel to keep time.
Chapter 8, "Booting the Kernel," describes what happens from Power On to Power Off. It traces how the various processors handle the loading of the kernel, including a description of BIOS, Open Firmware, and bootloaders. This chapter then goes through the linear order in kernel bringup and initialization, covering all the subsystems discussed in previous chapters.
Part III deals with a more hands-on approach to building and interacting with the Lirmx kernel:
序言回到顶部↑
Here there be dragons. Medieval mapmakers wrote that about unknown or dangerous places, and that is likely the feeling you get the first time you type:.
cd /usr/src/linux ; is
"Where do I start?" you wonder. "What exactly am I looking at? How does it all hang together and actually work?"
Modern, full-featured operating systems are big and complex. The number of subsystems is large, and their interactions are many and often subtle. And while it's great that you have the Linux kernel source code (more about that in a moment),knowing where to start, what to look at, and in what order, is far from self-evident.
That is the purpose of this book. Step by step, you will learn about the different kernel components, how they work, and how they relate to each other. The authors are intimately familiar with the kernel, and this knowledge shows through; by the end of the book, you and the kernel will at least be good friends, with the prospect of a deeper relationship ahead of you.
The Linux kernel is "Free" (as in freedom) Software. In The Free Software Definition, Richard Stallman defines the freedoms that make software Free (with a capital F). Freedom 0 is the freedom to run the software. This is the most funda-mental freedom. But immediately after that is Freedom 1, the freedom to study how aprogram works. This freedom is often overlooked. However, it is very important,because one of the best ways to learn how to do something is by watching other people do it. In the software world, that means reading other peoples' programs and seeing what they did well as well as what they did poorly. The freedoms of the GPL are, at least in my opinion, one of the most fundamental reasons that GNU/Linux systems have become such an important force in modern computing. Those freedoms benefit you every moment you use your GNU/Linux system, and it's a goodidea to stop and think about that every once in awhile. ..
With this book, we take advantage of Freedom 1 to give you the opportunity to study the Linux kernel source code in depth. You will see things that are done well,and other things that are done, shall we say, less well. But because of Freedom 1, you will see it all, and you will be able to learn from it.
And that brings me to the Prentice Hall Open Source Software Development Series,of which this book is one of the first members. The idea for the series developed from the principle that reading programs is one of the best ways to learn. Today, the world is blessed with an abundance of Free and Open Source software whose source code is just waiting (maybe even eager!) to be read, understood, and appreciated. The aim of the series is to be your guide up the software development learning curve, so to speak, and to help you learn by showing you as much real code as possible.
I sincerely hope that you will enjoy this book and learn a lot. I also hope that you will be inspired to carve out your own niche in the Free Software and Open Source worlds, which is definitely the most enjoyable way to participate in them. ...
Have fun!
Arnold Robbins
Series Editor
cd /usr/src/linux ; is
"Where do I start?" you wonder. "What exactly am I looking at? How does it all hang together and actually work?"
Modern, full-featured operating systems are big and complex. The number of subsystems is large, and their interactions are many and often subtle. And while it's great that you have the Linux kernel source code (more about that in a moment),knowing where to start, what to look at, and in what order, is far from self-evident.
That is the purpose of this book. Step by step, you will learn about the different kernel components, how they work, and how they relate to each other. The authors are intimately familiar with the kernel, and this knowledge shows through; by the end of the book, you and the kernel will at least be good friends, with the prospect of a deeper relationship ahead of you.
The Linux kernel is "Free" (as in freedom) Software. In The Free Software Definition, Richard Stallman defines the freedoms that make software Free (with a capital F). Freedom 0 is the freedom to run the software. This is the most funda-mental freedom. But immediately after that is Freedom 1, the freedom to study how aprogram works. This freedom is often overlooked. However, it is very important,because one of the best ways to learn how to do something is by watching other people do it. In the software world, that means reading other peoples' programs and seeing what they did well as well as what they did poorly. The freedoms of the GPL are, at least in my opinion, one of the most fundamental reasons that GNU/Linux systems have become such an important force in modern computing. Those freedoms benefit you every moment you use your GNU/Linux system, and it's a goodidea to stop and think about that every once in awhile. ..
With this book, we take advantage of Freedom 1 to give you the opportunity to study the Linux kernel source code in depth. You will see things that are done well,and other things that are done, shall we say, less well. But because of Freedom 1, you will see it all, and you will be able to learn from it.
And that brings me to the Prentice Hall Open Source Software Development Series,of which this book is one of the first members. The idea for the series developed from the principle that reading programs is one of the best ways to learn. Today, the world is blessed with an abundance of Free and Open Source software whose source code is just waiting (maybe even eager!) to be read, understood, and appreciated. The aim of the series is to be your guide up the software development learning curve, so to speak, and to help you learn by showing you as much real code as possible.
I sincerely hope that you will enjoy this book and learn a lot. I also hope that you will be inspired to carve out your own niche in the Free Software and Open Source worlds, which is definitely the most enjoyable way to participate in them. ...
Have fun!
Arnold Robbins
Series Editor


点击看大图




加载中...
