4.2. SWAPPING 196
4.2.1. Memory Management with Bitmaps 199
4.2.2. Memory Management with Linked Lists 200
4.3. VIRTUAL MEMORY 202
4.3.1. Paging 202
4.3.2. Page Tables 205
4.3.3. TLBs (Translation Lookaside Buffers) 211
4.3.4. Inverted Page Tables 213
4.4. PAGE REPLACEMENT ALGORITHMS
214
4.4.1. The Optimal Page Replacement Algorithm 215
4.4.2. The Not Recently Used Page Replacement Algorithm 216
4.4.3. The First-In, First-Out 217
4.4.4. The Second Chance Page Replacement Algorithm 217
4.4.5. The Clock Page Replacement Algorithm 218
4.4.6. The Least Recently Used 218
4.4.8. The Working Set Page Replacement Algorithm 222
4.4.9. The WSClock Page Replacement Algorithm 225
4.4.:. Summary of Page Replacement Algorithms 227
4.6. DESIGN ISSUES FOR PAGING
SYSTEMS 234
4.6.1. Local versus Global Allocation Policies 234
4.6.2. Load Control 236
4.6.3. Page Size 237
4.6.4. Separate Instruction and Data Spaces 239
4.6.5. Shared Pages 239
4.6.6. Cleaning Policy 241
4.6.7. Virtual Memory Interface 241
4.7. IMPLEMENTATION ISSUES
242
4.7.1. Operating System Involvement with Paging 242
4.7.2. Page Fault Handling 243
4.7.3. Instruction Backup 244
4.7.4. Locking Pages in Memory 246
4.7.5. Backing Store 246
4.7.6. Separation of Policy and Mechanism 247
5.2. PRINCIPLES OF I/O SOFTWARE
282
5.2.1. Goals of the I/O Software 283
5.2.2. Programmed I/O 284
5.2.3. Interrupt-Driven I/O 286
5.2.4. I/O Using DMA 287
5.3. I/O SOFTWARE LAYERS
287
5.3.1. Interrupt Handlers 287
5.3.2. Device Drivers 289
5.3.3. Device-Independent I/O Software 292
5.3.4. User-Space I/O Software 298
5.4. DISKS 300
5.4.1. Disk Hardware (solo Magnetic Disks) 300
5.4.2. Disk Formatting 315
5.4.3. Disk Arm Scheduling Algorithms 318
6.2. DIRECTORIES 393
6.2.1. Single-Level Directory Systems 393
6.2.2. Two-level Directory Systems 394
6.2.3. Hierarchical Directory Systems 395
6.2.4. Path Names 395
6.2.5. Directory Operations 398
6.3. FILE SYSTEM IMPLEMENTATION
399
6.3.1. File System Layout 399
6.3.2. Implementing Files 400
6.3.3. Implementing Directories 405
6.3.4. Shared Files 408
6.3.5. Disk Space Management 410
6.3.6. File System Reliability 416
6.3.7. File System Performance 424
10.5. INPUT/OUTPUT IN UNIX
723
10.5.1. Fundamental Concepts 724
10.5.2. Input/Output System Calls in UNIX 726
10.5.3. Implementation of Input/Output in UNIX 727
10.5.4. Streams 730
10.6. THE UNIX FILE SYSTEM
732
10.6.1. Fundamental Concepts 732
10.6.2. File System Calls in UNIX 736
10.6.3. Implementation of the UNIX File System 740
11.5. MEMORY MANAGEMENT
811
11.5.1. Fundamental Concepts 812
11.5.2. Memory Management System Calls 816
11.5.3. Implementation of Memory Management 817 (fino a pag. 820)
11.6. INPUT/OUTPUT IN WINDOWS
2000 824
11.6.1. Fundamental Concepts 824
11.6.2. Input/Output API Calls 825
11.6.3. Implementation of I/O 827
11.6.4. Device Drivers 827
11.7. THE WINDOWS 2000 FILE
SYSTEM 830
11.7.1. Fundamental Concepts 830
11.7.2. File System API Calls in Windows 2000 831
11.7.3. Implementation of the Windows 2000 File System 833