图书介绍
Linux内核编程必读 英文版PDF|Epub|txt|kindle电子书版本网盘下载
![Linux内核编程必读 英文版](https://www.shukui.net/cover/16/30992173.jpg)
- (美)罗德里格斯(Rodriguez C.S.)等著 著
- 出版社: 北京:机械工业出版社
- ISBN:7111193458
- 出版时间:2006
- 标注页数:614页
- 文件大小:78MB
- 文件页数:640页
- 主题词:Linux操作系统-英文
PDF下载
下载说明
Linux内核编程必读 英文版PDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
Chapter 1 Overview1
1.1 History of UNIX2
1.2 Standards and Common Interfaces4
1.3 Free Software and Open Source5
1.4 A Quick Survey of Linux Distributions5
1.4.1 Debian6
1.4.2 Red Hat/Fedora6
1.4.3 Mandriva7
1.4.4 SUSE7
1.4.5 Gentoo7
1.4.6 Yellow Dog7
1.4.7 Other Distros8
1.5 Kernel Release Information8
1.6 Linux on Power8
1.7 What Is an Operating System?9
1.8 Kernel Organization11
1.9 Overview of the Linux Kernel11
1.9.1 User Interface12
1.9.2 User Identification13
1.9.3 Files and Filesystems13
1.9.4 Processes20
1.9.5 System Calls24
1.9.6 Linux Scheduler24
1.9.7 Linux Device Drivers25
1.10 Portability and Architecture Dependence26
Summary27
Exercises27
Chapter 2 Exploration Toolkit29
2.1 Common Kernel Datatypes30
2.1.1 Linked Lists30
2.1.2 Searching34
2.1.3 Trees35
2.2 Assembly38
2.2.1 PowerPC39
2.2.2 x8642
2.3 Assembly Language Example46
2.3.1 x86 Assembly Example47
2.3.2 PowerPC Assembly Example50
2.4 Inline Assembly55
2.4.1 Ouput Operands55
2.4.2 Input Operands56
2.4.3 Clobbered Registers(or Clobber List)56
2.4.4 Parameter Numbering56
2.4.5 Constraints56
2.4.6 asm57
2.4.7 __volatile__57
2.5 Quirky C Language Usage62
2.5.1 asmlinkage62
2.5.2 UL63
2.5.3 inline63
2.5.4 const and volatile64
2.6 A Quick Tour of Kernel Exploration Tools65
2.6.1 objdump/readelf65
2.6.2 hexdump66
2.6.3 nm66
2.6.4 objcopy67
2.6.5 ar67
2.7 Kernel Speak:Listening to Kernel Messages67
2.7.1 printk()67
2.7.2 dmesg68
2.7.3 /var/log/messages68
2.8 Miscellaneous Quirks68
2.8.1 __init68
2.8.2 likely() and unlikely()69
2.8.3 IS_ERRand PTR ERR71
2.8.4 Notifier Chains71
Summary71
Project:Hellomod72
Step 1:Writing the Linux Module Skeleton72
Step 2:Compiling the Module74
Step 3:Running the Code75
Exercises76
Chapter 3 Processes:The Principal Model of Execution77
3.1 Introducing Our Program80
3.2 Process Descriptor82
3.2.1 Process Attribute-Related Fields84
3.2.2 Scheduling Related Fields87
3.2.3 Process Relations-Related Fields90
3.2.4 Process Credentials-Related Fields92
3.2.5 Process Capabilities-Related Fields94
3.2.6 Process Limitations-Related Fields97
3.2.7 Filesystem- and Address Space-Related Fields99
3.3 Process Creation:fork(),vfork(),and clone() System Calls101
3.3.1 fork() Function103
3.3.2 vfork() Function104
3.3.3 clone() Function105
3.3.4 do_fork() Function106
3.4 Process Lifespan109
3.4.1 Process States109
3.4.2 Process State Transitions111
3.5 Process Termination116
3.5.1 sys_exit()Function117
3.5.2 do_exit()Function117
3.5.3 Parent Notification and sys_wait4()120
3.6 Keeping Track of Processes:Basic Scheduler Construction124
3.6.1 Basic Structure125
3.6.2 Waking Up From Waiting or Activation126
3.7 Wait Queues133
3.7.1 Adding to the Wait Queue136
3.7.2 Waiting on the Event137
3.7.3 Waking Up140
3.8 Asynchronous Execution Flow142
3.8.1 Exceptions143
3.8.2 Interrupts146
Summary173
Project:current System Variable174
Project Source Code175
Running the Code177
Exercises177
Chapter 4 Memory Management179
4.1 Pages183
4.1.1 flags184
4.2 Memory Zones187
4.2.1 Memory Zone Descriptor187
4.2.2 Memory Zone Helper Functions190
4.3 Page Frames191
4.3.1 Functions for Requesting Page Frames191
4.3.2 Functions for Releasing Page Frames193
4.3.3 Buddy System194
4.4 Slab Allocator200
4.4.1 Cache Descriptor203
4.4.2 General Purpose Cache Descriptor207
4.4.3 Slab Descriptor208
4.5 Slab Allocator's Lifecycle211
4.5.1 Global Variables of the Slab Allocator211
4.5.2 Creating a Cache213
4.5.3 Slab Creation and cache_grow()219
4.5.4 Slab Destruction:Returning Memory and kmem_cache_destroy()222
4.6 Memory Request Path224
4.6.1 kmalloc()224
4.6.2 kmem_cache_alloc()225
4.7 Linux Process Memory Structures226
4.7.1 mm_struct227
4.7.2 vm_area_struct230
4.8 Process Image Layout and Linear Address Space232
4.9 Page Tables236
4.10 Page Fault237
4.10.1 x86 Page Fault Exception238
4.10.2 Page Fault Handler239
4.10.3 PowerPC Page Fault Exception249
Summary249
Project:Process Memory Map250
Exercises251
Chapter 5 Input/Output253
5.1 How Hardware Does It:Busses,Bridges,Ports,and Interfaces255
5.2 Devices260
5.2.1 Block Device Overview260
5.2.2 Request Queues and Scheduling I/O263
5.2.3 Example:"Generic" Block Driver274
5.2.4 Device Operations277
5.2.5 Character Device Overview279
5.2.6 A Note on Network Devices280
5.2.7 Clock Devices280
5.2.8 Terminal Devices280
5.2.9 Direct Memory Access(DMA)281
Summary281
Project:Building a Parallel Port Driver282
Parallel Port Hardware282
Parallel Port Software285
Exercises293
Chapter 6 Filesystems295
6.1 General Filesystem Concepts296
6.1.1 File and Filenames296
6.1.2 File Types297
6.1.3 Additional File Attributes298
6.1.4 Directories and Pathnarnes298
6.1.5 File Operations299
6.1.6 File Descriptors300
6.1.7 Disk Blocks,Partitions,and Implementation301
6.1.8 Performance302
6.2 Linux Virtual Filesystem302
6.2.1 VFS Data Structures305
6.2.2 Global and Local List References322
6.3 Structures Associated with VFS324
6.3.1 fs_struct Structure324
6.3.2 files_struct Structure326
6.4 Page Cache330
6.4.1 address_space Structure331
6.4.2 Buffer_head Structure334
6.5 VFS System Calls and the Filesystem Layer336
6.5.1 open()337
6.5.2 close()345
6.5.3 read()348
6.5.4 write()369
Summary371
Exercises372
Chapter 7 Scheduling and Kernel Synchronization373
7.1 Linux Scheduler375
7.1.1 Choosing the Next Task376
7.1.2 Context Switch383
7.1.3 Yielding the CPU394
7.2 Preemption405
7.2.1 Explicit Kernel Preemption405
7.2.2 Implicit User Preemption405
7.2.3 Implicit Kernel Preemption407
7.3 Spinlocks and Semaphores409
7.4 System Clock:Of Time and Timers411
7.4.1 Real-Time Clock:What Time Is It?412
7.4.2 Reading the PPC Real-Time Clock414
7.4.3 Reading the x86 Real-Time Clock417
Summary418
Exercises419
Chapter 8 Booting the Kernel421
8.1 BIOS and Open Firmware423
8.2 Boot Loaders424
8.2.1 GRUB426
8.2.2 LILO429
8.2.3 PowerPC and Yaboot430
8.3 Architecture-Dependent Memory Initialization431
8.3.1 PowerPC Hardware Memory Management431
8.3.2 x86 Intel-Based Hardware Memory Management444
8.3.3 PowerPC and x86 Code Convergence455
8.4 Initial RAM Disk456
8.5 The Beginning:start_kernel()456
8.5.1 The Call to lock_kernel()458
8.5.2 The Call to page_address_init()460
8.5.3 The Call to printk(linux_banner)464
8.5.4 The Call to setup_arch464
8.5.5 The Call to setup_per_cpu_areas()469
8.5.6 The Call to smp_prepare_boot_cpu()470
8.5.7 The Call to sched_init()471
8.5.8 The Call to build_all_zonelists()474
8.5.9 The Call to page_alloc_init475
8.5.10 The Call to parse_args()476
8.5.11 The Call to trap_init()479
8.5.12 The Call to rcu_init()479
8.5.13 The Call to init_IRQ()480
8.5.14 The Call to softirq_init()481
8.5.15 The Call to time_init()482
8.5.16 The Call to console_init()484
8.5.17 The Call to profile_init()485
8.5.18 The Call to local_irq_enable()485
8.5.19 initrd Configuration486
8.5.20 The Call to mem_init()486
8.5.21 The Call to late_time_init()493
8.5.22 The Call to calibrate_delay()494
8.5.23 The Call to pgtable_cache_init()495
8.5.24 The Call to buffer_init()497
8.5.25 The Call to security_scaffolding_startup()497
8.5.26 The Call to vfs_caches_init()498
8.5.27 The Call to radix_tree_init()508
8.5.28 The Call to signals_init()509
8.5.29 The Call to page_writeback_init()509
8.5.30 TheCall to proc_root_init()512
8.5.31 The Call to init_idle()514
8.5.32 The Call to rest_init()515
8.6 The initThread(or Process 1)517
Summary522
Exercises523
Chapter 9 Building the Linux Kernel525
9.1 Toolchain526
9.1.1 Compilers527
9.1.2 Cross Compilers528
9.1.3 Linker528
9.1.4 ELF Object Files529
9.2 Kernel Source Build536
9.2.1 Source Explained536
9.2.2 Building the Kernel Image542
Summary551
Exercises551
Chapter 10 Adding Your Code to the Kernel553
10.1 Traversing the Source554
10.1.1 Getting Familiar with the Filesystem555
10.1.2 Filps and Fops556
10.1.3 User Memory and Kernel Memory558
10.1.4 Wait Queues559
10.1.5 Work Queues and Interrupts564
10.1.6 System Calls567
10.1.7 Other Types of Drivers567
10.1.8 Device Model and sysfs572
10.2 Writing the Code575
10.2.1 Device Basics575
10.2.2 Symbol Exporting578
10.2.3 IOCTL578
10.2.4 Polling and Interrupts582
10.2.5 Work Queues and Tasklets586
10.2.6 Adding Code for a System Call588
10.3 Building and Debugging590
10.3.1 Debugging Device Drivers590
Summary591
Exercises593
Bibliography595
Index599