Preface |
|
xiv | |
|
|
1 | (54) |
|
What is an Operating System? |
|
|
4 | (2) |
|
The Operating System as an Extended Machine |
|
|
4 | (1) |
|
The Operating System as a Resource Manager |
|
|
5 | (1) |
|
History of Operating Systems |
|
|
6 | (13) |
|
The First Generation (1945--55) Vacuum Tubes and Plugboards |
|
|
7 | (1) |
|
The Second Generation (1955--65) Transistors and Batch Systems |
|
|
7 | (2) |
|
The Third Generation (1965--1980) ICs and Multiprogramming |
|
|
9 | (5) |
|
The Fourth Generation (1980--Present) Personal Computers |
|
|
14 | (2) |
|
|
16 | (3) |
|
Operating System Concepts |
|
|
19 | (7) |
|
|
20 | (2) |
|
|
22 | (3) |
|
|
25 | (1) |
|
|
26 | (16) |
|
System Calls for Process Management |
|
|
27 | (4) |
|
System Calls for Signaling |
|
|
31 | (2) |
|
System Calls for File Management |
|
|
33 | (5) |
|
System Calls for Directory Management |
|
|
38 | (2) |
|
System Calls for Protection |
|
|
40 | (2) |
|
System Calls for Time Management |
|
|
42 | (1) |
|
Operating System Structure |
|
|
42 | (9) |
|
|
42 | (3) |
|
|
45 | (1) |
|
|
46 | (3) |
|
|
49 | (1) |
|
|
49 | (2) |
|
Outline of the Rest of This Book |
|
|
51 | (1) |
|
|
51 | (4) |
|
|
55 | (166) |
|
Introduction to Processes |
|
|
55 | (14) |
|
|
56 | (1) |
|
|
57 | (2) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
60 | (2) |
|
Implementation of Processes |
|
|
62 | (2) |
|
|
64 | (5) |
|
Interprocess Communication |
|
|
|
|
69 | (1) |
|
|
70 | (1) |
|
Mutual Exclusion with Busy Waiting |
|
|
71 | (5) |
|
|
76 | (2) |
|
|
78 | (3) |
|
|
81 | (1) |
|
|
81 | (4) |
|
|
85 | (3) |
|
|
88 | (5) |
|
The Dining Philosophers Problem |
|
|
89 | (3) |
|
The Readers and Writers Problem |
|
|
92 | (1) |
|
|
93 | (19) |
|
Introduction to Scheduling |
|
|
94 | (5) |
|
Scheduling in Batch Systems |
|
|
99 | (3) |
|
Scheduling in Interactive Systems |
|
|
102 | (7) |
|
Scheduling in Real-Time Systems |
|
|
109 | (1) |
|
|
110 | (1) |
|
|
110 | (2) |
|
Overview of Processes in MINIX 3 |
|
|
112 | (13) |
|
The Internal Structure of MINIX 3 |
|
|
112 | (4) |
|
Process Management in MINIX 3 |
|
|
116 | (4) |
|
Interprocess Communication in MINIX 3 |
|
|
120 | (2) |
|
Process Scheduling in MINIX 3 |
|
|
122 | (3) |
|
Implementation of Processes in MINIX 3 |
|
|
125 | (67) |
|
Organization of the MINIX 3 Source Code |
|
|
125 | (3) |
|
Compiling and Runniing MINIX 3 |
|
|
128 | (2) |
|
|
130 | (8) |
|
|
138 | (8) |
|
Process Data Structures and Header Files |
|
|
146 | (10) |
|
|
156 | (4) |
|
|
160 | (7) |
|
Interrupt Handling in MINIX 3 |
|
|
167 | (11) |
|
Interprocess Communication in MINIX 3 |
|
|
178 | (4) |
|
|
182 | (3) |
|
Hardware-Dependent Kernel Support |
|
|
185 | (5) |
|
Utilities and the Kernel Library |
|
|
190 | (2) |
|
The System Task in MINIX 3 |
|
|
192 | (12) |
|
Overview of the System Task |
|
|
194 | (3) |
|
Implementation of the System Task |
|
|
197 | (3) |
|
Implementation of the System Libarary |
|
|
200 | (4) |
|
The Clock Task in MINIX 3 |
|
|
204 | (10) |
|
|
204 | (2) |
|
|
206 | (2) |
|
Overview of the Clock Driver in MINIX 3 |
|
|
208 | (4) |
|
Implementation of the Clock Driver in MINIX 3 |
|
|
212 | (2) |
|
|
214 | (7) |
|
|
221 | (152) |
|
Principles of I/O Hardware |
|
|
222 | (7) |
|
|
223 | (2) |
|
|
|
|
225 | (1) |
|
|
226 | (1) |
|
|
227 | (2) |
|
Principles of I/O Software |
|
|
229 | (8) |
|
Goals of the I/O Software |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
231 | (2) |
|
Device-Independent I/O Software |
|
|
233 | (3) |
|
|
236 | (1) |
|
|
237 | (15) |
|
|
238 | (1) |
|
|
239 | (3) |
|
|
242 | (2) |
|
|
244 | (1) |
|
|
245 | (2) |
|
|
247 | (5) |
|
Overview of I/O in MINIX 3 |
|
|
252 | (9) |
|
Interrupt Handlers in MINIX 3 |
|
|
252 | (4) |
|
Device Drivers in MINIX 3 |
|
|
256 | (3) |
|
Device-Independent I/O Software in MINIX 3 |
|
|
259 | (1) |
|
User-level I/O Software in MINIX 3 |
|
|
260 | (1) |
|
Deadlock Handling in MINIX 3 |
|
|
260 | (1) |
|
|
261 | (10) |
|
Overview of Block Device Drivers in MINIX 3 |
|
|
262 | (3) |
|
Common Block Device Driver Software |
|
|
265 | (4) |
|
|
269 | (2) |
|
|
271 | (7) |
|
RAM Disk Hardware and Software |
|
|
271 | (2) |
|
Overview of the RAM Disk Driver in MINIX 3 |
|
|
273 | (1) |
|
Implementation of the RAM Disk Driver in MINIX 3 |
|
|
274 | (4) |
|
|
278 | (24) |
|
|
278 | (2) |
|
|
280 | (1) |
|
|
281 | (6) |
|
Overview of the Hard Disk Driver in MINIX 3 |
|
|
287 | (3) |
|
Implementation of the Hard Disk Driver in MINIX 3 |
|
|
290 | (10) |
|
|
300 | (2) |
|
|
302 | (64) |
|
|
303 | (4) |
|
|
307 | (9) |
|
Overview of the Terminal Driver in MINIX 3 |
|
|
316 | (15) |
|
Implementation of the Device-Independent Terminal Driver |
|
|
331 | (19) |
|
Implementation of the Keyboard Driver |
|
|
350 | (7) |
|
Implementation of the Display Driver |
|
|
357 | (9) |
|
|
366 | (7) |
|
|
373 | (108) |
|
|
374 | (4) |
|
Monoprogramming without Swapping or Paging |
|
|
374 | (1) |
|
Multiprogramming with Fixed Partitions |
|
|
375 | (2) |
|
Relocation and Protection |
|
|
377 | (1) |
|
|
378 | (5) |
|
Memory Management with Bitmaps |
|
|
380 | (1) |
|
Memory Management with Linked Lists |
|
|
381 | (2) |
|
|
383 | (13) |
|
|
384 | (4) |
|
|
388 | (4) |
|
TLBs---Translation Lookaside Buffers |
|
|
392 | (3) |
|
|
395 | (1) |
|
Page Replacement Algorithms |
|
|
396 | (8) |
|
The Optimal Page Replacement Algorithm |
|
|
397 | (1) |
|
The Not Recently Used Page Replacement Algorithm |
|
|
398 | (1) |
|
The First-In, First-Out (FIFO) Page Replacement Algorithm |
|
|
399 | (1) |
|
The Second Chance Page Replacement Algorithm |
|
|
399 | (1) |
|
The Clock Page Replacement Algorithm |
|
|
400 | |
|
The Least Recently Used (LRU) Page Replacement Algorithm |
|
|
40 | (361) |
|
Simulating LRU in Software |
|
|
401 | (3) |
|
Design Issues for Paging Systems |
|
|
404 | (6) |
|
|
404 | (2) |
|
Local versus Global Allocation Policies |
|
|
406 | (2) |
|
|
408 | (2) |
|
|
410 | (1) |
|
|
410 | (10) |
|
Implementation of Pure Segmentation |
|
|
414 | (1) |
|
Segmentation with Paging: The Intel Pentium |
|
|
415 | (5) |
|
Overview of the MINIX 3 Process Manager |
|
|
420 | (27) |
|
|
422 | (3) |
|
|
425 | (1) |
|
Process Manager Data Structures and Algorithms |
|
|
426 | (6) |
|
The FORK, EXIT, and WAIT System Calls |
|
|
432 | (1) |
|
|
433 | (4) |
|
|
437 | (1) |
|
|
438 | (8) |
|
|
446 | (1) |
|
Implementation of the MINIX 3 Process Manager |
|
|
447 | (28) |
|
The Header Files and Data Structures |
|
|
447 | (3) |
|
|
450 | (5) |
|
Implementation of FORK, EXIT, and Wait |
|
|
455 | (3) |
|
|
458 | (3) |
|
|
461 | (1) |
|
Implementation of Signal Handling |
|
|
462 | (9) |
|
Implementation of Other System Calls |
|
|
471 | (2) |
|
Memory Management Utilities |
|
|
473 | (2) |
|
|
475 | (6) |
|
|
481 | (130) |
|
|
482 | (9) |
|
|
482 | (2) |
|
|
484 | (1) |
|
|
485 | (3) |
|
|
488 | (1) |
|
|
488 | (2) |
|
|
490 | (1) |
|
|
491 | (6) |
|
|
491 | (1) |
|
Hierarchical Directory Systems |
|
|
492 | (1) |
|
|
493 | (3) |
|
|
496 | (1) |
|
File System Implementation |
|
|
497 | (29) |
|
|
497 | (2) |
|
|
499 | (3) |
|
|
502 | (7) |
|
|
509 | (3) |
|
|
512 | (7) |
|
|
519 | (5) |
|
Log-Structured File Systems |
|
|
524 | (2) |
|
|
526 | (11) |
|
|
526 | (5) |
|
|
531 | (1) |
|
Design Principles for Security |
|
|
532 | (1) |
|
|
533 | (4) |
|
|
537 | (11) |
|
|
537 | (2) |
|
|
539 | (3) |
|
|
542 | (3) |
|
|
545 | (3) |
|
Overview of the MINIX 3 File System |
|
|
548 | (18) |
|
|
549 | (1) |
|
|
549 | (4) |
|
|
553 | (2) |
|
|
555 | (2) |
|
|
557 | (2) |
|
|
559 | (2) |
|
|
561 | (2) |
|
|
563 | (1) |
|
|
563 | (2) |
|
An Example: The Read System Call |
|
|
565 | (1) |
|
Implementation of the MINIX 3 File System |
|
|
566 | (45) |
|
Header Files and Global Data Structures |
|
|
566 | (4) |
|
|
570 | (9) |
|
|
579 | (4) |
|
Operations on Individual Files |
|
|
583 | (8) |
|
|
591 | (5) |
|
|
596 | (1) |
|
|
597 | (6) |
|
Additional System Call Support |
|
|
603 | (2) |
|
|
605 | (1) |
|
|
606 | (1) |
|
|
606 | (5) |
|
Reading List and Bibliography |
|
|
611 | (424) |
|
Suggestions for Further Reading |
|
|
611 | (7) |
|
Introduction and General Works |
|
|
611 | (3) |
|
|
614 | (1) |
|
|
614 | (1) |
|
|
615 | (1) |
|
|
616 | (2) |
|
Alphabetical Bibliography |
|
|
618 | (11) |
|
|
|
|
629 | (10) |
|
B. MINIX 3 Source Code Listing |
|
|
639 | (394) |
|
|
1033 | (2) |
Index |
|
1035 | |