The textbook : Advanced Linux Programming
Authors : Mark Mitchell, Jeffrey Oldham, and Alex Samuel
Final target : Enhance my ability of programming
The plan : Learn at least one section every day
The codes can get from :
Table of Contents
I Advanced UNIX Programming
with Linux 1
1 Getting Started 3
1.1 Editing with Emacs 4
1.2 Compiling with GCC 6
1.3 Automating the Process with GNU
Make 9
1.4 Debugging with GNU Debugger
(GDB) 11
1.5 Finding More Information 13
2 Writing Good GNU/Linux
Software 17
2.1 Interaction With the Execution
Environment 17
2.2 Coding Defensively 30
2.3 Writing and Using Libraries 36
3 Processes 45
3.1 Looking at Processes 45
3.2 Creating Processes 48
3.3 Signals 52
3.4 Process Termination 55
4 Threads 61
4.1 Thread Creation 62
4.2 Thread Cancellation 69
4.3 Thread-Specific Data 72
4.4 Synchronization and Critical Sections 77
4.5 GNU/Linux Thread Implementation 92
4.6 Processes Vs.Threads 94
5 Interprocess Communication 95
5.1 Shared Memory 96
5.2 Processes Semaphores 101
5.3 Mapped Memory 105
5.4 Pipes 110
5.5 Sockets 116
II Mastering Linux 127
6 Devices 129
6.1 Device Types 130
6.2 Device Numbers 130
6.3 Device Entries 131
6.4 Hardware Devices 133
6.5 Special Devices 136
6.6 PTYs 142
6.7 ioctl 144
7 The /proc File System 147
7.1 Extracting Information from /proc 148
7.2 Process Entries 150
7.3 Hardware Information 158
7.4 Kernel Information 160
7.5 Drives, Mounts, and File Systems 161
7.6 System Statistics 165
8 Linux System Calls 167
8.1 Using strace 168
8.2 access:Testing File Permissions 169
8.3 fcntl: Locks and Other File
Operations 171
8.4 fsync and fdatasync: Flushing Disk
Buffers 173
8.5 getrlimit and setrlimit: Resource
Limits 174
8.6 getrusage: Process Statistics 175
8.7 gettimeofday:Wall-Clock Time 176
8.8 The mlock Family: Locking Physical
Memory 177
8.9 mprotect: Setting Memory
Permissions 179
8.10 nanosleep: High-Precision Sleeping 181
8.11 readlink: Reading Symbolic Links 182
8.12 sendfile: Fast Data Transfers 183
8.13 setitimer: Setting Interval Timers 185
8.14 sysinfo: Obtaining System Statistics 186
8.15 uname 187
9 Inline Assembly Code 189
9.1 When to Use Assembly Code 190
9.2 Simple Inline Assembly 191
9.3 Extended Assembly Syntax 192
9.4 Example 194
9.5 Optimization Issues 196
9.6 Maintenance and Portability Issues 196
10 Security 197
10.1 Users and Groups 198
10.2 Process User IDs and Process
Group IDs 199
10.3 File System Permissions 200
10.4 Real and Effective IDs 205
10.5 Authenticating Users 208
10.6 More Security Holes 211
11 A Sample GNU/Linux
Application 219
11.1 Overview 219
11.2 Implementation 221
11.3 Modules 239
11.4 Using the Server 252
11.5 Finishing Up 255
阅读(1100) | 评论(0) | 转发(0) |