Atnaujinkite slapukų nuostatas

Linux Kernel Primer, The: A Top-Down Approach for x86 and PowerPC Architectures [Minkštas viršelis]

3.00/5 (21 ratings by Goodreads)
  • Formatas: Paperback / softback, 648 pages, aukštis x plotis x storis: 232x176x32 mm, weight: 900 g
  • Serija: Pearson Open Source Software Development Series
  • Išleidimo metai: 06-Oct-2005
  • Leidėjas: Prentice Hall
  • ISBN-10: 0131181637
  • ISBN-13: 9780131181632
Kitos knygos pagal šią temą:
  • Formatas: Paperback / softback, 648 pages, aukštis x plotis x storis: 232x176x32 mm, weight: 900 g
  • Serija: Pearson Open Source Software Development Series
  • Išleidimo metai: 06-Oct-2005
  • Leidėjas: Prentice Hall
  • ISBN-10: 0131181637
  • ISBN-13: 9780131181632
Kitos knygos pagal šią temą:
Top Reasons people will buy this book: -Covers Linux on PPC -Top-down approach traces functionality from user space into the kernel -Lots of code commentary and examples. It walks you through the actual source code implementation. -Side by side comparison of x86 and PPC -Hands on Examples and Projects -Covers the kernel build system. The "Linux Kernel Primer" offers a comprehensive view of the underpinnings of the Linux kernel. This book starts with a guide of the necessary tools a developer needs to be able to understand and manipulate the source code including cryptic programming fundamentals found throughout the kernel code. It then follows up with an in depth analysis of the major subsystems including process management, memory management, scheduling, I/O, and filesystems. This book also provides information necessary to get started developing on the Linux kernel. The specifics of Intel and PowerPC architecture implementations are covered side by side providing perspective on architecture specific features and how Linux make use of them. Similar in approach to Kernighan's "Practice of Programming" 020161586X

Recenzijos

Link:

http://aplawrence.com/Books/kernel-primer.html

 

Full Text:

I've been less than happy with other kernel books I've read. Admittedly,it's a difficult subject: there's a lot to cover, and you really need quite a bit of programming and general Unix knowledge before you could even consider jumping into this area. But I have the background,have even written simple Unix drivers, and yet every other kernel programming book has disappointed me.

It's all so overwhelming: there are conventions and quirks that have developed over time and surely are second nature to the people who have been doing Linux kernels for years, but these things are baffling to the newcomer.

This book tries to get you past that. The authors specifically say that they have tried to cover the things that confused them when they first started looking at the kernel. I'm sure their efforts aren't perfect, but the effort does definitely show.

The authors present several programming projects to help explore the kernel concepts, and every chapter has review questions to help firm up your understanding. The approach is from user space when possible: the assumption is that you are comfortable with application programming and that is used as the base to lead you down into the work done by the kernel for your programs. There's plenty of annotated source code here, both for x86 and PowerPC architectures. The inclusion of PowerPC information was an unexpected bonus; other books I've read have usually ignored that entirely or glossed it over quickly.

Of course you need a background in C, and while this does try to cover general kernel subjects, it wouldn't hurt to have at least some prior reading there. A little familiarity with hardware and light assembly language will help also, although the authors do give some coverage there.

I'm looking forward to spending more time exploring this book.

 

Foreword xvii
Acknowledgments xix
About the Authors xxi
Preface xxiii
Overview
1(28)
History of UNIX
2(2)
Standards and Common Interfaces
4(1)
Free Software and Open Source
5(1)
A Quick Survey of Linux Distributions
5(3)
Debian
6(1)
Red Hat/Fedora
6(1)
Mandriva
7(1)
SUSE
7(1)
Gentoo
7(1)
Yellow Dog
7(1)
Other Distros
8(1)
Kernel Release Information
8(1)
Linux on Power
8(1)
What Is an Operating System?
9(2)
Kernel Organization
11(1)
Overview of the Linux Kernel
11(15)
User Interface
12(1)
User Identification
13(1)
Files and Filesystems
13(7)
Processes
20(4)
System Calls
24(1)
Linux Scheduler
24(1)
Linux Device Drivers
25(1)
Portability and Architecture Dependence
26(3)
Summary
27(1)
Exercises
27(2)
Exploration Toolkit
29(48)
Common Kernel Datatypes
30(8)
Linked Lists
30(4)
Searching
34(1)
Trees
35(3)
Assembly
38(8)
PowerPC
39(3)
x86
42(4)
Assembly Language Example
46(9)
x86 Assembly Example
47(3)
PowerPC Assembly Example
50(5)
Inline Assembly
55(7)
Ouput Operands
55(1)
Input Operands
56(1)
Clobbered Registers (or Clobber List)
56(1)
Parameter Numbering
56(1)
Constraints
56(1)
asm
57(1)
_volatile_
57(5)
Quirky C Language Usage
62(3)
asmlinkage
62(1)
UL
63(1)
inline
63(1)
const and volatile
64(1)
A Quick Tour of Kernel Exploration Tools
65(2)
objdump/readelf
65(1)
hexdump
66(1)
nm
66(1)
objcopy
67(1)
ar
67(1)
Kernel Speak: Listening to Kernel Messages
67(1)
printk()
67(1)
dmesg
68(1)
/var/log/messages
68(1)
Miscellaneous Quirks
68(9)
_init
68(1)
likely() and unlikely()
69(2)
IS_ERR and PTR_ERR
71(1)
Notifier Chains
71(1)
Summary
71(1)
Project: Hellomod
72(1)
Step 1: Writing the Linux Module Skeleton
72(2)
Step 2: Compiling the Module
74(1)
Step 3: Running the Code
75(1)
Exercises
76(1)
Processes: The Principal Model of Execution
77(102)
Introducing Our Program
80(2)
Process Descriptor
82(19)
Process Attribute-Related Fields
84(3)
Scheduling Related Fields
87(3)
Process Relations-Related Fields
90(2)
Process Credentials-Related Fields
92(2)
Process Capabilities-Related Fields
94(3)
Process Limitations-Related Fields
97(2)
Filesystem- and Address Space-Related Fields
99(2)
Process Creation: fork(), vfork(), and clone() System Calls
101(8)
fork() Function
103(1)
vfork() Function
104(1)
clone() Function
105(1)
do_fork() Function
106(3)
Process Lifespan
109(7)
Process States
109(2)
Process State Transitions
111(5)
Process Termination
116(8)
sys_exit()Function
117(1)
do_exit()Function
117(3)
Parent Notification and sys_wait4()
120(4)
Keeping Track of Processes: Basic Scheduler Construction
124(9)
Basic Structure
125(1)
Waking Up From Waiting or Activation
126(7)
Wait Queues
133(9)
Adding to the Wait Queue
136(1)
Waiting on the Event
137(3)
Waking Up
140(2)
Asynchronous Execution Flow
142(37)
Exceptions
143(3)
Interrupts
146(27)
Summary
173(1)
Project: current System Variable
174(1)
Project Source Code
175(2)
Running the Code
177(1)
Exercises
177(2)
Memory Management
179(74)
Pages
183(4)
flags
184(3)
Memory Zones
187(4)
Memory Zone Descriptor
187(3)
Memory Zone Helper Functions
190(1)
Page Frames
191(9)
Functions for Requesting Page Frames
191(2)
Functions for Releasing Page Frames
193(1)
Buddy System
194(6)
Slab Allocator
200(11)
Cache Descriptor
203(4)
General Purpose Cache Descriptor
207(1)
Slab Descriptor
208(3)
Slab Allocator's Lifecycle
211(13)
Global Variables of the Slab Allocator
211(2)
Creating a Cache
213(6)
Slab Creation and cache_grow()
219(3)
Slab Destruction: Returning Memory and kmem_cache_destroy()
222(2)
Memory Request Path
224(2)
kmalloc()
224(1)
kmem_cache_alloc()
225(1)
Linux Process Memory Structures
226(6)
mm_struct
227(3)
vm_area_struct
230(2)
Process Image Layout and Linear Address Space
232(4)
Page Tables
236(1)
Page Fault
237(16)
x86 Page Fault Exception
238(1)
Page Fault Handler
239(10)
PowerPC Page Fault Exception
249(1)
Summary
249(1)
Project: Process Memory Map
250(1)
Exercises
251(2)
Input/Output
253(42)
How Hardware Does It: Busses, Bridges, Ports, and Interfaces
255(5)
Devices
260(35)
Block Device Overview
260(3)
Request Queues and Scheduling I/O
263(11)
Example: ``Generic'' Block Driver
274(3)
Device Operations
277(2)
Character Device Overview
279(1)
A Note on Network Devices
280(1)
Clock Devices
280(1)
Terminal Devices
280(1)
Direct Memory Access (DMA)
281(1)
Summary
281(1)
Project: Building a Parallel Port Driver
282(1)
Parallel Port Hardware
282(3)
Parallel Port Software
285(8)
Exercises
293(2)
Filesystems
295(78)
General Filesystem Concepts
296(6)
File and Filenames
296(1)
File Types
297(1)
Additional File Attributes
298(1)
Directories and Pathnames
298(1)
File Operations
299(1)
File Descriptors
300(1)
Disk Blocks, Partitions, and Implementation
301(1)
Performance
302(1)
Linux Virtual Filesystem
302(22)
VFS Data Structures
305(17)
Global and Local List References
322(2)
Structures Associated with VFS
324(6)
fs_struct Structure
324(2)
files_struct Structure
326(4)
Page Cache
330(6)
address_space Structure
331(3)
Buffer_head Structure
334(2)
VFS System Calls and the Filesystem Layer
336(37)
open()
337(8)
close()
345(3)
read()
348(21)
write()
369(2)
Summary
371(1)
Exercises
372(1)
Scheduling and Kernel Synchronization
373(48)
Linux Scheduler
375(30)
Choosing the Next Task
376(7)
Context Switch
383(11)
Yielding the CPU
394(11)
Preemption
405(4)
Explicit Kernel Preemption
405(1)
Implicit User Preemption
405(2)
Implicit Kernel Preemption
407(2)
Spinlocks and Semaphores
409(2)
System Clock: Of Time and Timers
411(10)
Real-Time Clock: What Time Is It?
412(2)
Reading the PPC Real-Time Clock
414(3)
Reading the x86 Real-Time Clock
417(1)
Summary
418(1)
Exercises
419(2)
Booting the Kernel
421(104)
BIOS and Open Firmware
423(1)
Boot Loaders
424(7)
GRUB
426(3)
LILO
429(1)
PowerPC and Yaboot
430(1)
Architecture-Dependent Memory Initialization
431(25)
PowerPC Hardware Memory Management
431(13)
x86 Intel-Based Hardware Memory Management
444(11)
PowerPC and x86 Code Convergence
455(1)
Initial RAM Disk
456(1)
The Beginning: start_kernel()
456(61)
The Call to lock_kernel()
458(2)
The Call to page_address_init()
460(4)
The Call to printk(linux_banner)
464(1)
The Call to setup_arch
464(5)
The Call to setup_per_cpu_areas()
469(1)
The Call to smp_prepare_boot_cpu()
470(1)
The Call to sched_init()
471(3)
The Call to build_all_zonelists()
474(1)
The Call to page_alloc_init
475(1)
The Call to parse_args()
476(3)
The Call to trap_init()
479(1)
The Call to rcu_init()
479(1)
The Call to init_IRQ()
480(1)
The Call to softirq_init()
481(1)
The Call to time_init()
482(2)
The Call to console_init()
484(1)
The Call to profile_init()
485(1)
The Call to local_irq_enable()
485(1)
initrd Configuration
486(1)
The Call to mem_init()
486(7)
The Call to late_time_init()
493(1)
The Call to calibrate_delay()
494(1)
The Call to pgtable_cache_init()
495(2)
The Call to buffer_init()
497(1)
The Call to security_scaffolding_startup()
497(1)
The Call to vfs_caches_init()
498(10)
The Call to radix_tree_init()
508(1)
The Call to signals_init()
509(1)
The Call to page_writeback_init()
509(3)
The Call to proc_root_init()
512(2)
The Call to init_idle()
514(1)
The Call to rest_init()
515(2)
The init Thread (or Process 1)
517(8)
Summary
522(1)
Exercises
523(2)
Building the Linux Kernel
525(28)
Toolchain
526(10)
Compilers
527(1)
Cross Compilers
528(1)
Linker
528(1)
ELF Object Files
529(7)
Kernel Source Build
536(17)
Source Explained
536(6)
Building the Kernel Image
542(9)
Summary
551(1)
Exercises
551(2)
Adding Your Code to the Kernel
553(42)
Traversing the Source
554(21)
Getting Familiar with the Filesystem
555(1)
Filps and Fops
556(2)
User Memory and Kernel Memory
558(1)
Wait Queues
559(5)
Work Queues and Interrupts
564(3)
System Calls
567(1)
Other Types of Drivers
567(5)
Device Model and sysfs
572(3)
Writing the Code
575(15)
Device Basics
575(3)
Symbol Exporting
578(1)
IOCTL
578(4)
Polling and Interrupts
582(4)
Work Queues and Tasklets
586(2)
Adding Code for a System Call
588(2)
Building and Debugging
590(5)
Debugging Device Drivers
590(1)
Summary
591(2)
Exercises
593(2)
Bibliography 595(4)
Index 599


Claudia Salzberg Rodriguez has been a Linux systems programmer for over 5 years and has worked with Linux on a wide variety of platforms ranging from embedded to High Performance systems on both Intel and PPC. She received a Bachelor of Science from Brown University in 1997 and a Master of Science in Computer Science from the University of Pennsylvania in 1999. She currently works in IBM's Linux Technology Center developing the kernel and associated programming tools.

Gordon Fischer has been using Linux and other Unices since 1996. He has written device drivers for RF tuners, modulators and other low-level devices. He has used both the 2.2 and 2.4 Linux kernels in enterprise settings ranging from servers to embedded devices across both i386 and PPC chipsets. He believes all code should be written in either C or LISP.

Steve Smolski has been in the semiconductor business for 26 years and has always been interested in the line between hardware and software. He has worked in manufacturing, test, and development of memory, processors, and ASICS. He has written applications and device drivers for Windows, AIX, Linux, and several embedded operating systems. His favorite jobs have been in robotics and multimedia.



© Copyright Pearson Education. All rights reserved.