|
|
|
1 | (22) |
|
|
|
1 | (1) |
|
1.2 Roles of Systems Programming |
|
|
1 | (1) |
|
1.3 Objectives of This Book |
|
|
2 | (2) |
|
1.3.1 Strengthen Students Programming Background |
|
|
2 | (1) |
|
1.3.2 Applications of Dynamic Data Structures |
|
|
2 | (1) |
|
1.3.3 Process Concept and Process Management |
|
|
3 | (1) |
|
1.3.4 Concurrent Programming |
|
|
3 | (1) |
|
1.3.5 Timer and Time Functions |
|
|
3 | (1) |
|
1.3.6 Signals, Signal Processing and IPC |
|
|
3 | (1) |
|
|
|
4 | (1) |
|
1.3.8 TCP/IP and Network Programming |
|
|
4 | (1) |
|
|
|
4 | (1) |
|
1.5 Unique Features of This Book |
|
|
4 | (2) |
|
1.6 Use This Book As Textbook in Systems Programming Courses |
|
|
6 | (1) |
|
1.7 Other Reference Books |
|
|
7 | (1) |
|
|
|
7 | (2) |
|
|
|
7 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
1.9 Introduction to Linux |
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
10 | (1) |
|
|
|
10 | (1) |
|
1.11 Linux Hardware Platforms |
|
|
10 | (1) |
|
1.12 Linux on Virtual Machines |
|
|
10 | (5) |
|
|
|
10 | (2) |
|
|
|
12 | (2) |
|
1.12.3 Dual Boot Slackware and Ubuntu Linux |
|
|
14 | (1) |
|
|
|
15 | (1) |
|
1.13.1 Linux kernel image |
|
|
15 | (1) |
|
|
|
15 | (1) |
|
|
|
15 | (1) |
|
|
|
16 | (1) |
|
|
|
16 | (1) |
|
1.13.6 Command Executions |
|
|
16 | (1) |
|
|
|
16 | (2) |
|
|
|
16 | (1) |
|
1.14.2 Special Features of Ubuntu Linux |
|
|
17 | (1) |
|
1.15 Unix/Linux File System Organization |
|
|
18 | (2) |
|
|
|
18 | (1) |
|
|
|
19 | (1) |
|
1.15.3 Unix/Linux Commands |
|
|
19 | (1) |
|
|
|
19 | (1) |
|
1.16 Ubuntu Linux System Administration |
|
|
20 | (1) |
|
|
|
20 | (1) |
|
|
|
20 | (1) |
|
|
|
21 | (1) |
|
|
|
21 | (2) |
|
|
|
21 | (2) |
|
|
|
23 | (78) |
|
2.1 Text Editors in Linux |
|
|
23 | (2) |
|
|
|
23 | (1) |
|
|
|
24 | (1) |
|
|
|
24 | (1) |
|
|
|
25 | (2) |
|
|
|
25 | (1) |
|
|
|
26 | (1) |
|
|
|
26 | (1) |
|
|
|
27 | (6) |
|
2.3.1 Program Development Steps |
|
|
27 | (1) |
|
|
|
27 | (1) |
|
2.3.3 Compile-Link in GCC |
|
|
28 | (1) |
|
2.3.4 Static vs. Dynamic Linking |
|
|
29 | (1) |
|
2.3.5 Executable File Format |
|
|
30 | (1) |
|
2.3.6 Contents of about File |
|
|
30 | (1) |
|
|
|
31 | (1) |
|
2.3.8 Program Termination |
|
|
32 | (1) |
|
|
|
33 | (7) |
|
2.4.1 Run-Time Stack Usage in 32-Bit GCC |
|
|
33 | (2) |
|
|
|
35 | (1) |
|
2.4.3 Return From Function Call |
|
|
35 | (1) |
|
|
|
36 | (1) |
|
2.4.5 Run-Time Stack Usage in 64-Bit GCC |
|
|
37 | (3) |
|
2.5 Link C Program with Assembly Code |
|
|
40 | (5) |
|
2.5.1 Programming in Assembly |
|
|
41 | (2) |
|
2.5.2 Implement Functions in Assembly |
|
|
43 | (1) |
|
2.5.3 Call C functions from Assembly |
|
|
44 | (1) |
|
|
|
45 | (1) |
|
2.6.1 Static Link Library |
|
|
45 | (1) |
|
2.6.2 Dynamic Link Library |
|
|
46 | (1) |
|
|
|
46 | (7) |
|
|
|
46 | (1) |
|
|
|
46 | (1) |
|
|
|
47 | (6) |
|
|
|
53 | (9) |
|
2.8.1 Use GDB in Emacs IDE |
|
|
53 | (5) |
|
2.8.2 Advices on Using Debugging Tools |
|
|
58 | (1) |
|
2.8.3 Common Errors in C programs |
|
|
58 | (4) |
|
|
|
62 | (4) |
|
2.9.1 Structure and Pointers |
|
|
64 | (1) |
|
|
|
64 | (2) |
|
2.10 Link List Processing |
|
|
66 | (19) |
|
|
|
66 | (1) |
|
2.10.2 Link List Operations |
|
|
66 | (1) |
|
|
|
67 | (3) |
|
2.10.4 Link List Traversal |
|
|
70 | (2) |
|
|
|
72 | (1) |
|
|
|
72 | (1) |
|
|
|
73 | (1) |
|
|
|
74 | (1) |
|
2.10.9 Circular Link List |
|
|
75 | (1) |
|
2.10.10 Open-Ended C Structures |
|
|
75 | (1) |
|
2.10.11 Doubly Link Lists |
|
|
76 | (1) |
|
2.10.12 Doubly Link Lists Example Programs |
|
|
76 | (9) |
|
|
|
85 | (1) |
|
|
|
85 | (5) |
|
2.12.1 Binary Search Tree |
|
|
85 | (1) |
|
2.12.2 Build a Binary Search Tree (BST) |
|
|
86 | (1) |
|
2.12.3 Binary Tree Traversal Algorithms |
|
|
87 | (1) |
|
2.12.4 Depth-First Traversal Algorithms |
|
|
87 | (1) |
|
2.12.5 Breadth-First Traversal Algorithms |
|
|
88 | (2) |
|
2.13 Programming Project: Unix/Linux File System Tree Simulator |
|
|
90 | (7) |
|
2.13.1 Unix/Linux File System Tree |
|
|
90 | (1) |
|
2.13.2 Implement General Tree by Binary Tree |
|
|
90 | (1) |
|
2.13.3 Project Specification and Requirements |
|
|
90 | (1) |
|
2.13.4 Commands Specification |
|
|
91 | (1) |
|
2.13.5 Program Organization |
|
|
91 | (3) |
|
2.13.6 Command Algorithms |
|
|
94 | (3) |
|
|
|
97 | (1) |
|
|
|
97 | (4) |
|
|
|
100 | (1) |
|
3 Process Management in Unix/Linux |
|
|
101 | (40) |
|
|
|
101 | (1) |
|
|
|
102 | (1) |
|
3.3 A Multitasking System |
|
|
103 | (8) |
|
|
|
103 | (1) |
|
|
|
103 | (1) |
|
|
|
104 | (1) |
|
|
|
105 | (3) |
|
3.3.5 Explanations of the Multitasking System Code |
|
|
108 | (3) |
|
3.4 Process Synchronization |
|
|
111 | (1) |
|
|
|
111 | (1) |
|
|
|
112 | (1) |
|
|
|
112 | (3) |
|
3.5.1 Algorithm of kexit() |
|
|
112 | (1) |
|
3.5.2 Process Family Tree |
|
|
113 | (1) |
|
3.5.3 Wait for Child Process Termination |
|
|
114 | (1) |
|
3.6 Process Management in the MT Multitasking System |
|
|
115 | (1) |
|
3.7 Processes in Unix/Linux |
|
|
115 | (3) |
|
|
|
115 | (1) |
|
3.7.2 IMT and Daemon Processes |
|
|
116 | (1) |
|
|
|
117 | (1) |
|
|
|
117 | (1) |
|
3.7.5 Process Execution Modes |
|
|
117 | (1) |
|
3.8 System Calls for Process Management |
|
|
118 | (11) |
|
|
|
119 | (1) |
|
3.8.2 Process Execution Order |
|
|
120 | (1) |
|
3.8.3 Process Termination |
|
|
121 | (1) |
|
3.8.4 Wait for Child Process Termination |
|
|
122 | (1) |
|
3.8.5 Subreaper Process in Linux |
|
|
123 | (2) |
|
3.8.6 exec(): Change Process Execution Image |
|
|
125 | (1) |
|
3.8.7 Environment Variables |
|
|
126 | (3) |
|
|
|
129 | (2) |
|
3.9.1 FILE Streams and File Descriptors |
|
|
129 | (1) |
|
3.9.2 FILE Stream I/O and System Call |
|
|
130 | (1) |
|
|
|
130 | (1) |
|
|
|
131 | (1) |
|
|
|
131 | (6) |
|
3.10.1 Pipe Programming in Unix/Linux |
|
|
131 | (3) |
|
3.10.2 Pipe Command Processing |
|
|
134 | (1) |
|
3.10.3 Connect PIPE writer to PIPE reader |
|
|
134 | (1) |
|
|
|
135 | (2) |
|
3.11 Programming Project: sh Simulator |
|
|
137 | (2) |
|
3.11.1 Single Command with I/O Redirection |
|
|
137 | (1) |
|
3.11.2 Commands with Pipes |
|
|
138 | (1) |
|
3.11.3 ELF executable vs. sh script files |
|
|
138 | (1) |
|
|
|
138 | (1) |
|
|
|
139 | (2) |
|
|
|
140 | (1) |
|
|
|
141 | (46) |
|
4.1 Introduction to Parallel Computing |
|
|
141 | (2) |
|
4.1.1 Sequential Algorithms vs. Parallel Algorithms |
|
|
142 | (1) |
|
4.1.2 Parallelism vs. Concurrency |
|
|
142 | (1) |
|
|
|
143 | (1) |
|
4.2.1 Principle of Threads |
|
|
143 | (1) |
|
4.2.2 Advantages of Threads |
|
|
143 | (1) |
|
4.2.3 Disadvantages of Threads |
|
|
144 | (1) |
|
|
|
144 | (1) |
|
4.4 Threads Management Functions |
|
|
144 | (3) |
|
|
|
145 | (1) |
|
|
|
146 | (1) |
|
|
|
146 | (1) |
|
|
|
146 | (1) |
|
4.5 Threads Example Programs |
|
|
147 | (4) |
|
4.5.1 Sum of Matrix by Threads |
|
|
147 | (1) |
|
4.5.2 Quicksort by Threads |
|
|
148 | (3) |
|
4.6 Threads Synchronization |
|
|
151 | (14) |
|
|
|
151 | (3) |
|
4.6.2 Deadlock Prevention |
|
|
154 | (1) |
|
4.6.3 Condition Variables |
|
|
155 | (1) |
|
4.6.4 Producer-Consumer Problem |
|
|
156 | (3) |
|
|
|
159 | (1) |
|
|
|
160 | (1) |
|
4.6.7 Solve System of Linear Equations by Concurrent Threads |
|
|
161 | (4) |
|
|
|
165 | (1) |
|
4.7 Programming Project: User-Level Threads |
|
|
165 | (20) |
|
4.7.1 Project Base Code: A Multitasking System |
|
|
165 | (4) |
|
|
|
169 | (3) |
|
4.7.3 Implementation of Thread Join Operation |
|
|
172 | (4) |
|
4.7.4 Implementation of Mutex Operations |
|
|
176 | (1) |
|
4.7.5 Test Project with Mutex by Concurrent Programs |
|
|
177 | (4) |
|
4.7.6 Implementation of Semaphores |
|
|
181 | (1) |
|
4.7.7 Producer-Consumer Problem using Semaphores |
|
|
181 | (4) |
|
|
|
185 | (2) |
|
|
|
185 | (2) |
|
5 Timers and Time Service |
|
|
187 | (18) |
|
|
|
187 | (1) |
|
|
|
187 | (1) |
|
|
|
188 | (1) |
|
|
|
189 | (1) |
|
5.5 Time Service Functions |
|
|
189 | (3) |
|
5.5.1 Gettimeofday-Settimeofday |
|
|
189 | (2) |
|
5.5.2 The Time System Call |
|
|
191 | (1) |
|
5.5.3 The Times System Call |
|
|
191 | (1) |
|
5.5.4 Time and Date Commands |
|
|
192 | (1) |
|
|
|
192 | (3) |
|
5.7 REAL Mode Interval Timer |
|
|
195 | (1) |
|
|
|
195 | (8) |
|
|
|
195 | (4) |
|
|
|
199 | (1) |
|
|
|
200 | (2) |
|
|
|
202 | (1) |
|
|
|
203 | (1) |
|
|
|
203 | (2) |
|
|
|
204 | (1) |
|
6 Signals and Signal Processing |
|
|
205 | (16) |
|
6.1 Signals and Interrupts |
|
|
205 | (2) |
|
6.2 Examples of Unix/Linux Signals |
|
|
207 | (1) |
|
6.3 Signal Processing in Unix/Linux |
|
|
208 | (4) |
|
|
|
208 | (1) |
|
|
|
209 | (1) |
|
6.3.3 Signals in Process PROC Structure |
|
|
209 | (1) |
|
|
|
209 | (1) |
|
6.3.5 Install Signal Catchers |
|
|
210 | (2) |
|
6.4 Signal Processing Steps |
|
|
212 | (1) |
|
6.5 Signals and Exceptions |
|
|
213 | (1) |
|
|
|
213 | (2) |
|
|
|
215 | (1) |
|
|
|
215 | (1) |
|
|
|
215 | (1) |
|
|
|
215 | (1) |
|
6.7.4 POSIX Message Queues |
|
|
216 | (1) |
|
6.7.5 Threads Synchronization Mechanisms |
|
|
216 | (1) |
|
|
|
216 | (1) |
|
6.8 Programming Project: Implement an IPC for Messages |
|
|
216 | (2) |
|
|
|
218 | (3) |
|
|
|
219 | (2) |
|
|
|
221 | (24) |
|
7.1 File Operation Levels |
|
|
221 | (2) |
|
|
|
223 | (3) |
|
7.3 Low Level File Operations |
|
|
226 | (5) |
|
|
|
226 | (3) |
|
|
|
229 | (1) |
|
|
|
230 | (1) |
|
7.4 Introduction to EXT2 File System |
|
|
231 | (4) |
|
7.4.1 EXT2 File System Data Structures |
|
|
231 | (1) |
|
|
|
231 | (1) |
|
|
|
232 | (1) |
|
|
|
233 | (1) |
|
|
|
233 | (1) |
|
|
|
234 | (1) |
|
|
|
235 | (8) |
|
|
|
235 | (2) |
|
|
|
237 | (2) |
|
|
|
239 | (2) |
|
7.5.4 Display Directory Entries |
|
|
241 | (2) |
|
7.6 Programming Project: Convert File Pathname to Inode |
|
|
243 | (1) |
|
|
|
244 | (1) |
|
|
|
244 | (1) |
|
8 System Calls for File Operations |
|
|
245 | (22) |
|
|
|
245 | (1) |
|
8.2 System Call Man Pages |
|
|
245 | (1) |
|
8.3 System Calls for File Operations |
|
|
246 | (2) |
|
8.4 Commonly used system Calls |
|
|
248 | (2) |
|
|
|
250 | (1) |
|
|
|
250 | (1) |
|
8.5.2 Symbolic Link Files |
|
|
250 | (1) |
|
|
|
251 | (7) |
|
|
|
251 | (1) |
|
|
|
252 | (1) |
|
8.6.3 Stat and File Inode |
|
|
253 | (1) |
|
8.6.4 File Type and Permissions |
|
|
254 | (1) |
|
8.6.5 Opendir-Readdir Functions |
|
|
255 | (1) |
|
|
|
256 | (1) |
|
|
|
256 | (2) |
|
8.7 open-close-lseek System Calls |
|
|
258 | (1) |
|
8.7.1 Open File and File Descriptor |
|
|
258 | (1) |
|
8.7.2 Close File Descriptor |
|
|
259 | (1) |
|
8.7.3 Iseek File Descriptor |
|
|
259 | (1) |
|
|
|
259 | (1) |
|
|
|
260 | (1) |
|
8.10 File Operation Example Programs |
|
|
260 | (4) |
|
8.10.1 Display File Contents |
|
|
260 | (1) |
|
|
|
261 | (1) |
|
8.10.3 Selective File Copy |
|
|
262 | (2) |
|
8.11 Programming Project: Recursive Copy Files using System Calls |
|
|
264 | (1) |
|
|
|
264 | (1) |
|
|
|
264 | (1) |
|
|
|
265 | (2) |
|
|
|
265 | (2) |
|
|
|
267 | (16) |
|
9.1 Library I/O Functions |
|
|
267 | (1) |
|
9.2 Library I/O Functions vs. System Calls |
|
|
267 | (4) |
|
9.3 Algorithms of Library I/O Functions |
|
|
271 | (1) |
|
|
|
271 | (1) |
|
9.3.2 Algorithm of fwrite |
|
|
271 | (1) |
|
9.3.3 Algorithm of fclose |
|
|
271 | (1) |
|
9.4 Use Library I/O Function or System Call |
|
|
272 | (1) |
|
|
|
272 | (3) |
|
|
|
272 | (1) |
|
|
|
273 | (1) |
|
|
|
274 | (1) |
|
9.5.4 In-memory Conversion Functions |
|
|
274 | (1) |
|
9.5.5 Other Library I/O Functions |
|
|
274 | (1) |
|
9.5.6 Restriction on Mixed fread-fwrite |
|
|
275 | (1) |
|
9.6 File Stream Buffering |
|
|
275 | (1) |
|
9.7 Functions with Varying Parameters |
|
|
276 | (1) |
|
9.8 Programming Project: Printf-like Function |
|
|
277 | (3) |
|
9.8.1 Project Specification |
|
|
278 | (1) |
|
9.8.2 Base Code of Project |
|
|
278 | (1) |
|
9.8.3 Algorithm of myprintf() |
|
|
279 | (1) |
|
9.8.4 Project Refinements |
|
|
279 | (1) |
|
9.8.5 Project Demonstration and Sample Solutions |
|
|
279 | (1) |
|
|
|
280 | (3) |
|
|
|
281 | (2) |
|
|
|
283 | (18) |
|
|
|
283 | (1) |
|
10.2 sh Scripts vs. C Programs |
|
|
284 | (1) |
|
10.3 Command-line parameters |
|
|
284 | (1) |
|
|
|
285 | (1) |
|
|
|
285 | (1) |
|
|
|
286 | (1) |
|
|
|
286 | (2) |
|
|
|
286 | (1) |
|
|
|
287 | (1) |
|
10.8 Command Substitution |
|
|
288 | (1) |
|
10.9 Sh Control Statements |
|
|
288 | (4) |
|
10.9.1 if-else-fi statement |
|
|
288 | (2) |
|
|
|
290 | (1) |
|
|
|
291 | (1) |
|
10.9.4 until-do Statement |
|
|
291 | (1) |
|
|
|
292 | (1) |
|
10.9.6 continue and break Statements |
|
|
292 | (1) |
|
|
|
292 | (1) |
|
|
|
292 | (1) |
|
|
|
293 | (1) |
|
|
|
294 | (1) |
|
|
|
295 | (1) |
|
|
|
295 | (1) |
|
10.16 Debugging sh Scripts |
|
|
296 | (1) |
|
10.17 Applications of sh scripts |
|
|
296 | (2) |
|
10.18 Programming Project: Recursive File Copy by sh Script |
|
|
298 | (2) |
|
|
|
300 | (1) |
|
|
|
300 | (1) |
|
|
|
301 | (56) |
|
|
|
301 | (1) |
|
11.2 EXT2 File System Data Structures |
|
|
302 | (4) |
|
11.2.1 Create Virtual Disk by mkfs |
|
|
302 | (1) |
|
11.2.2 Virtual Disk Layout |
|
|
302 | (1) |
|
|
|
302 | (1) |
|
|
|
303 | (1) |
|
11.2.5 Block and Inode Bitmaps |
|
|
304 | (1) |
|
|
|
304 | (1) |
|
|
|
305 | (1) |
|
|
|
305 | (1) |
|
|
|
306 | (1) |
|
11.3.1 Test-Set-Clear Bits in C |
|
|
306 | (1) |
|
11.3.2 Convert INODE Number to INODE on Disk |
|
|
307 | (1) |
|
11.4 Programming Examples |
|
|
307 | (8) |
|
11.4.1 Display Superblock |
|
|
308 | (2) |
|
|
|
310 | (2) |
|
11.4.3 Display Root Inode |
|
|
312 | (1) |
|
11.4.4 Display Directory Entries |
|
|
313 | (2) |
|
11.5 Traverse EXT2 File System Tree |
|
|
315 | (2) |
|
11.5.1 Traversal Algorithm |
|
|
315 | (2) |
|
11.5.2 Convert Pathname to INODE |
|
|
317 | (1) |
|
11.5.3 Display INODE Disk Blocks |
|
|
317 | (1) |
|
11.6 Implementation of EXT2 File System |
|
|
317 | (2) |
|
11.6.1 File System Organization |
|
|
317 | (1) |
|
11.6.2 Files System Levels |
|
|
318 | (1) |
|
|
|
319 | (13) |
|
|
|
319 | (4) |
|
|
|
323 | (4) |
|
|
|
327 | (4) |
|
11.7.4 Implementation of Base File System |
|
|
331 | (1) |
|
11.8 File System Level-1 Functions |
|
|
332 | (12) |
|
11.8.1 Algorithm of mkdir |
|
|
332 | (4) |
|
11.8.2 Algorithm of creat |
|
|
336 | (1) |
|
11.8.3 Implementation of mkdir-creat |
|
|
336 | (1) |
|
11.8.4 Algorithm of rmdir |
|
|
337 | (3) |
|
11.8.5 Implementation of rmdir |
|
|
340 | (1) |
|
|
|
340 | (2) |
|
11.8.7 Algorithm of unlink |
|
|
342 | (1) |
|
11.8.8 Algorithm of symlink |
|
|
343 | (1) |
|
11.8.9 Algorithm of readlink |
|
|
343 | (1) |
|
11.8.10 Other Level-1 Functions |
|
|
343 | (1) |
|
11.8.11 Programming Project #1: Implementation of File System Level-1 |
|
|
344 | (1) |
|
11.9 File System Level-2 Functions |
|
|
344 | (7) |
|
|
|
345 | (1) |
|
|
|
346 | (1) |
|
11.9.3 Algorithm of close |
|
|
346 | (1) |
|
11.9.4 Read Regular Files |
|
|
346 | (2) |
|
11.9.5 Write Regular Files |
|
|
348 | (2) |
|
|
|
350 | (1) |
|
11.9.7 Programming Project #2: Implementation of File System Level-2 |
|
|
350 | (1) |
|
11.10 File System Level-3 |
|
|
351 | (3) |
|
11.10.1 Algorithm of mount |
|
|
351 | (1) |
|
11.10.2 Algorithm of umount |
|
|
352 | (1) |
|
11.10.3 Cross Mounting Points |
|
|
352 | (1) |
|
|
|
353 | (1) |
|
11.10.5 Real and Effective uid |
|
|
353 | (1) |
|
|
|
354 | (1) |
|
11.10.7 Programming Project #3: Implementation of Complete File System |
|
|
354 | (1) |
|
11.11 Extensions of File System Project |
|
|
354 | (1) |
|
|
|
355 | (2) |
|
|
|
356 | (1) |
|
12 Block Device I/O and Buffer Management |
|
|
357 | (20) |
|
12.1 Block Device I/O Buffers |
|
|
357 | (2) |
|
12.2 Unix I/O Buffer Management Algorithm |
|
|
359 | (3) |
|
12.2.1 Shortcomings of Unix Algorithm |
|
|
362 | (1) |
|
12.3 New I/O Buffer Management Algorithm |
|
|
362 | (1) |
|
12.3.1 Buffer Management Algorithm using Semaphores |
|
|
363 | (1) |
|
|
|
363 | (2) |
|
12.5 Programming Project: Comparison of I/O Buffer Management Algorithms |
|
|
365 | (10) |
|
12.5.1 System Organization |
|
|
365 | (1) |
|
12.5.2 Multitasking System |
|
|
366 | (1) |
|
|
|
367 | (1) |
|
|
|
367 | (1) |
|
|
|
368 | (1) |
|
|
|
368 | (1) |
|
|
|
368 | (1) |
|
12.5.8 Project Requirements |
|
|
368 | (1) |
|
|
|
369 | (5) |
|
|
|
374 | (1) |
|
12.6 Refinements of Simulation System |
|
|
375 | (1) |
|
12.7 Refinements of PV Algorithm |
|
|
375 | (1) |
|
|
|
375 | (2) |
|
|
|
376 | (1) |
|
13 TCP/IP and Network Programming |
|
|
377 | (36) |
|
13.1 Introduction to Network Programming |
|
|
377 | (1) |
|
|
|
377 | (2) |
|
13.3 IP Host and IP address |
|
|
379 | (1) |
|
|
|
379 | (1) |
|
|
|
379 | (1) |
|
|
|
380 | (1) |
|
13.7 UDP User Datagram Protocol |
|
|
380 | (1) |
|
13.8 TCP Transmission Control Protocol |
|
|
380 | (1) |
|
|
|
380 | (1) |
|
13.10 Network and Host Byte Orders |
|
|
381 | (1) |
|
13.11 Data How in TCP/TP Networks |
|
|
381 | (1) |
|
13.12 Network Programming |
|
|
382 | (1) |
|
13.12.1 Network Programming Platforms |
|
|
382 | (1) |
|
13.12.2 Server-Client Computing Model |
|
|
383 | (1) |
|
|
|
383 | (2) |
|
|
|
383 | (1) |
|
|
|
384 | (1) |
|
13.14 UDP Echo Server-Client Program |
|
|
385 | (2) |
|
13.15 TCP Echo Server-Client Program |
|
|
387 | (4) |
|
13.16 Hostname and IP Address |
|
|
391 | (3) |
|
13.17 TCP Programming Project: File Server on Internet |
|
|
394 | (2) |
|
13.17.1 Project Specification |
|
|
394 | (1) |
|
|
|
395 | (1) |
|
13.17.3 Multi-threaded TCP Server |
|
|
396 | (1) |
|
13.18 Web and CGI Programming |
|
|
396 | (11) |
|
13.18.1 HTTP Programming Model |
|
|
396 | (1) |
|
|
|
397 | (2) |
|
13.18.3 Hosting Web Pages |
|
|
399 | (1) |
|
13.18.4 Configure HTTPD for Web Pages |
|
|
400 | (1) |
|
13.18.5 Dynamic Web Pages |
|
|
401 | (1) |
|
|
|
401 | (5) |
|
|
|
406 | (1) |
|
13.18.8 Configure HTTPD for CGI |
|
|
406 | (1) |
|
13.19 CGI Programming Project: Dynamic Webpage by CGI |
|
|
407 | (4) |
|
|
|
411 | (2) |
|
|
|
412 | (1) |
|
|
|
413 | (36) |
|
14.1 Introduction to MySQL |
|
|
413 | (1) |
|
|
|
414 | (1) |
|
|
|
414 | (1) |
|
|
|
414 | (1) |
|
|
|
415 | (18) |
|
14.3.1 Connect to MySQL Server |
|
|
415 | (1) |
|
|
|
415 | (1) |
|
14.3.3 Create New database |
|
|
416 | (1) |
|
|
|
416 | (1) |
|
|
|
417 | (1) |
|
|
|
417 | (1) |
|
|
|
418 | (1) |
|
14.3.8 Data Types in MySQL |
|
|
419 | (1) |
|
|
|
419 | (1) |
|
|
|
420 | (1) |
|
|
|
421 | (1) |
|
|
|
422 | (2) |
|
|
|
424 | (3) |
|
|
|
427 | (2) |
|
14.3.15 MySQL Database Diagram |
|
|
429 | (1) |
|
|
|
429 | (4) |
|
14.4 MySQL Programming in C |
|
|
433 | (7) |
|
14.4.1 Build MySQL Client Program in C |
|
|
433 | (1) |
|
14.4.2 Connect to MySQL Server in C |
|
|
433 | (2) |
|
14.4.3 Build MySQL Database in C |
|
|
435 | (2) |
|
14.4.4 Retrieve Results of MySQL Queries in C |
|
|
437 | (3) |
|
14.5 MySQL Programming in PHP |
|
|
440 | (7) |
|
14.5.1 Connect to MySQL Server in PHP |
|
|
441 | (1) |
|
14.5.2 Create Database Tables in PHP |
|
|
442 | (1) |
|
14.5.3 Insert Records into Table in PHP |
|
|
442 | (3) |
|
14.5.4 Retrieve Results of MySQL Queries in PHP |
|
|
445 | (1) |
|
14.5.5 Update Operation in PHP |
|
|
446 | (1) |
|
14.5.6 Delete Rows in PHP |
|
|
447 | (1) |
|
|
|
447 | (2) |
|
|
|
448 | (1) |
| Index |
|
449 | |