UNIX Internals: The New Frontiers

1. Introduction. Introduction. The Mandate For Change. Looking Back, Looking Forward. The Scope of This Book. References. 2. The Process and the Kernel. Introduction. Mode, Space, and Context. The Process Abstraction. Executing In Kernel Mode. Synchronization. Process Scheduling. Signals. New Processes and Programs. Summary. Exercises. References. 3. Threads and Lightweight Processes. Introduction. Fundamental Abstractions. Lightweight Process Design-Issues To Consider. User-Lever Threads Libraries. Scheduler Activations. Multithreading in Solaris and SVR4. Threads In MACH. Digital UNIX. MACH 3.0 Continuations. Summary. Exercises. References. 4. Signals and Session Management. Introduction. Signal Generation and Handling. Unreliable Signals. Reliable Signals. Signals in SVR4. Signals Implementation. Exceptions. MACH Exception Handling. Process Groups and Terminal Management. The SVR4 Sessions Architecture. Summary. Exercises. References. 5. Process Scheduling. Introduction. Clock Interrupt Handling. Scheduler Goals. Traditional UNIX Scheduling. The SVR4 Scheduler. SOLARIS 2.X Scheduling Enhancements. Scheduling in MACH. The Digital UNIX Real-Time Scheduler. Other Scheduling Implementations. Summary. Exercises. References. 6. Interprocess Communications. Introduction. Universal IPC Facilities. System V IPC. MACH IPC. Messages. Ports. Message Passing. Port Operations. Extensibility. MACH 3.0 Enhancements. Discussion. Summary. Exercises. References. 7. Synchronization and Multiprocessing. Introduction. Synchronization in Traditional UNIX Kernels. Multiprocessor Systems. Multiprocessor Synchronization Issues. Semaphores. Spin Locks. Condition Variables. Read-Write Locks. Reference Counts. Other Considerations. Case Studies. Summary. Exercises. References. 8. File System Interface and Framework. Introduction. The User Interface to Files. File Systems. Special Files. File System Framework. The Vnode/VFS Architecture. Implementation Overview. File-System-Dependent Objects. Mounting a File System. Operations on Files. Analysis. Summary. Exercises. References. 9. File System Implementations. Introduction. The System V File System (s5fs). S5fs Kernel Organization. Analysis of S5fs. The Berkeley Fast File System. Hard Disk Structure. On-Disk Organization. FFS Functionality Enhancements. Analysis. Temporary File Systems. Special-Purpose File Systems. The Old Buffer Cache. Summary. Exercises. References. 10. Distributed File Systems. Introduction. General Characteristics of Distributed File Systems. Network File System (NFS). The Protocol Suite. NFS Implementation. UNIX Semantics. NFS Performance. Dedicated NFS Servers. NFS Security. NFS Version 3. Remote File Sharing (RFS). RFS Architecture. RFS Implementation. Client-Side Caching. The Andrew File System. AFS Implementation. AFS Shortcomings. The DCE Distributed File System (DCE DFS). Summary. Exercises. References. 11. Advanced File Systems. Introduction. Limitations of Traditional File Systems. File System Clustering (Sun-FFS). The Journaling Approach. Log-Structured File Systems. The 4.4BSD Log-Structured File System. Metadata Logging. The Episode File System. Watchdogs. The 4.4BSD Portal File System. Stackable File System Layers. The 4.4BSD File System Interface. Summary. Exercises. References. 12. Kernel Memory Allocation. Introduction. Functional Requirements. Resource Map Allocator. Simple Power-of-Two Free Lists. The McKusick-Karels Allocator. The Buddy System. The SVR4 Lazy Buddy Algorithm. The MACH-OSF/1 Zone Allocator. A Hierarchical Allocator for Multiprocessors. The Solaris 2.4 Slab Allocator. Summary. Exercises. References. 13. Virtual Memory. Introduction. Demand Paging. Hardware Requirements. 4.3BSD - A Case Study. 4.3BSD Memory Management Operations. Analysis. Exercises. References. 14. The SVR4 VM Architecture. Motivation. Memory-Mapped Files. VM Design Principles. Fundamental Abstractions. Segment Drivers. The Swap Layer. VM Operations. Interaction with the Vnode Subsystem. Virtual Swap Space in Solaris. Analysis. Performance Improvements. Summary. Exercises. References. 15. More Memory Management Topics. Introduction. MACH Memory Management Design. Memory Sharing Facilities. Memory Objects and Pagers. External and Internal Pagers. Page Replacement. Analysis. Memory Management in 4.4BSD. Translation Lookaside Buffer (TLB) Consistency. TLB Shootdown in MACH. TLB Consistency in SVR4 and SVR4.2 UNIX. Other TLB Consistency Algorithms. Virtually Addressed Caches. Exercises. References. 16. Device Drivers and I/O. Introduction. Overview. Device Driver Framework. The I/O Subsystem. The poll System Call. Block I/O. The DDI/DKI Specification. Newer SVR4 Releases. Future Directions. Summary. Exercises. References. 17. Streams. Motivation. Overview. Messages and Queues. Stream I/O. Configuration and Setup. STREAMS ioctls. Memory Allocation. Multiplexing. FIFOs and Pipes. Networking Interfaces. Summary. Exercises. References. Index.