Preface to the Second Revised Edition Preface ro the Second Edition Preface to rhe First Edition Part I: SYSTEMS PROGRAMMING I Language Processors l .1 Introduction 1 l .2 Language Processing Activities 5 I .3 Fundamentals of Language Processing 9 I .4 Fundamentals of Language Specification 19 I .5 Language Processor Development Tools 3J Bibliography 34 2 Data Structures for Language Processing 2. I Search Data Structures 38 2.2 Allocation Data Structures 52 Bibliography 57 3 Scanning and Parsing 3. I Scanning 59 3.2 Parsing 64 Bibliography 85 4 Assemblers 4. I Elements of Assembly Language Programming 86 4.2 A Simple Assembly Scheme 91 4.3 Pass Structure of Assemblers 94 4.4 Design of a Two Pass Assembler 95 4.5 A Single Pass Assembler for IBM PC Ill Bibliography l30 5 Macros and Macro Processors 5. l Macro Definition and Call 132 5.2 Macro Expansion 133 5.3 Nested Macro Calls 137 5.4 Advanced Macro Facilities 138 5.5 Design of a Macro Preprocessor 145 Bibliography 161 6 Compilers and Interpreters 6. I Aspects of Compilation 162 6.2 Memory Allocation 165 6.3 Compilation of Expressions 180 6.4 Compilation of Control Structures 192 6.5 Code Optimization 199 6.6 Interpreters 212 Bibliography 218 7 Linkers 7. 1 Relocation and Linking Concepts 223 7.2 Design of a Linker 228 7.3 Self-Relocating Programs 232 7.4 A Linker for MS DOS 233 7.5 Linking for Overlays 245 7.6 Loaders 248 Bibliography 248 8 Software Tnols 8.1 Software Tools for Program Development 250 8.2 Editors 257 8.3 Debug Monitors 260 8.4 Programming Environments 262 8.5 User Interfaces 264 Bibliography 269 Part II: OPERATING SYSTEMS 9 Evolutinn of OS Functions 9.1 OS Functions 273 9.2 Evolution of OS Functions 276 9.3 Batch Processing Systems 277 9.4 Multiprogramming Systems 287 9.5 Time Sharing Systems 305 9.6 Real Time Operating Systems 311 9.7 OS Structure 313 Bibliography 31 7 ID Processes IO. I Process Definition 320 IO.2 Process Control 322 lO.3 Interacting Processes 327 1O.4 Implementation of Interacting Processes 332 1O.5 Threads 336 Bibliography 342 11 Scheduling 11 .1 Scheduling Policies 343 11 .2 Job Scheouling 351 11 .3 Process Scheduling 353 11 .4 Process Management in Unix 365 1l .5 Scheduling io Multiprocessor OS 366 Bibliography 368 12 Deadlocks 12.1 Definitions 37J 12.2 Resource Status Modelling 372 I2.3 Handling Deadlocks 377 l2.4 Deadlock Detection and Resolution 383 l2.5 Deadlock Avoidance 386 I2.6 Mixed Approach to Deadlock Handling 393 Bibliography 395 13 Ptocess Synchronization 13. I Impiementing Control Synchronization 396 13.2 Critical Sections 399 13.3 Classical Process Synchronization Problems 408 13.4 Evolution of Language Features for Process Synchronization 411 13.5 Semaphores 413 13.6 Critical Regions 419 13.7 Conditional Critical Regions 422 13.8 Monitors 426 13.9 Concurrent Programming in Ada 437 Bibliography 443 14 Interprocess Communication 14. I Interprocess Messages 447 14.2 Implementation Issues 448 14.3 Mailboxes 454 14.4 Interprocess Messages in Unix 456 14.5 Interprocess Messages in Mach 458 Bibliography 459 15 Memory Management 15. I Memory Allocation Preliminaries 461 l5.2 Contiguous Memory Allocation 471 15.3 Noncontiguous Memory Allocation 479 15.4 Virtual Memory Using Paging 482 l5.5 Virtual Memory Using Segmentation 511 Bibliography 5 l 8 16 IO Organization and IO Programming 16.I IO Organization 522 16.2 IO Devices 526 16.3 Physical IOCS PIOCS 529 16.4 Fundamental File Organizations 542 16.5 Advanced IO Programming 544 16.6 Logical IOCS 552 16.7 File Processing in Unix 560 Bibliography 560 17 File Systems 17. 1 Directory Structures 563 17.2 File Protection 569 17.3 Allocation of Disk Space 569 l7.4 Implementing File Access 571 17.5 File Sharing 576 17.6 File System Reliability 578 17.7 The Unix File System 584 Bibliography 587 18 Protection and Security 18.I Encryption of Data 588 18.2 Protection and Security Mechanisms 591 18.3 Protection of User Files 592 18.4 Capabilities 596 Hibliography 603 19 Distributed Operating Systems 19. I Oennition and Examples 605 19.2 Design Issues in Distributed Operating Systems 608 19.3 Networking Issues 611 19.4 Communication Protocols 615 19.5 System State and Event Precedence 619 19.6 Resource Allocation 622 19.7 Algorilhms for Distributed Control 624 19.8 File Systems 633 19.9 Reliabiliry 637 19.1O Security 643 Blbliography 649 Index