معرفی کتاب «Computer Systems: A Programmer's Perspective (2nd Edition)» نوشتهٔ Maas، Sarah J و Bryant, Randal E.;O'Hallaron, Davie Richard، منتشرشده توسط نشر Addison Wesley در سال 2010. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
**For Computer Systems, Computer Organization and Architecture courses in CS, EE, and ECE departments.** Few students studying computer science or computer engineering will ever have the opportunity to build a computer system. On the other hand, most students will be required to use and program computers on a near daily basis. __Computer Systems: A Programmer’s Perspective__ introduces the important and enduring concepts that underlie computer systems by showing how these ideas affect the correctness, performance, and utility of application programs. The text's hands-on approach (including a comprehensive set of labs) helps students understand the “under-the-hood” operation of a modern computer system and prepares them for future courses in systems topics such as compilers, computer architecture, operating systems, and networking. Visit the CSS:AP web page http://csapp.cs.cmu.edu for more information and resources. Cover......Page 1 Title Page......Page 4 Copyright......Page 5 Contents......Page 8 Preface......Page 20 About the Authors......Page 34 1 A Tour of Computer Systems......Page 36 1.1 Information Is Bits + Context......Page 38 1.2 Programs Are Translated by Other Programs into Different Forms......Page 39 1.3 It Pays to Understand How Compilation Systems Work......Page 41 1.4.1 Hardware Organization of a System......Page 42 1.4.2 Running the hello Program......Page 45 1.5 Caches Matter......Page 47 1.6 Storage Devices Form a Hierarchy......Page 48 1.7 The Operating System Manages the Hardware......Page 49 1.7.1 Processes......Page 51 1.7.3 Virtual Memory......Page 52 1.7.4 Files......Page 54 1.8 Systems Communicate with Other Systems Using Networks......Page 55 1.9.1 Concurrency and Parallelism......Page 56 1.9.2 The Importance of Abstractions in Computer Systems......Page 59 1.10 Summary......Page 60 Bibliographic Notes......Page 61 Part I: Program Structure and Execution......Page 62 2 Representing and Manipulating Information......Page 64 2.1 Information Storage......Page 68 2.2 Integer Representations......Page 91 2.3 Integer Arithmetic......Page 114 2.4 Floating Point......Page 134 2.5 Summary......Page 153 Homework Problems......Page 154 Solutions to Practice Problems......Page 169 3 Machine-Level Representation of Programs......Page 188 3.1 A Historical Perspective......Page 191 3.2 Program Encodings......Page 194 3.3 Data Formats......Page 202 3.4 Accessing Information......Page 203 3.5 Arithmetic and Logical Operations......Page 212 3.6 Control......Page 220 3.7 Procedures......Page 254 3.8 Array Allocation and Access......Page 267 3.9 Heterogeneous Data Structures......Page 276 3.10 Putting It Together: Understanding Pointers......Page 287 3.11 Life in the Real World: Using the GDB Debugger......Page 289 3.12 Out-of-Bounds Memory References and Buffer Overflow......Page 291 3.13 x86-64: Extending IA32 to 64 Bits......Page 302 3.14 Machine-Level Representations of Floating-Point Programs......Page 327 3.15 Summary......Page 328 Homework Problems......Page 329 Solutions to Practice Problems......Page 343 4 Processor Architecture......Page 368 4.1 The Y86 Instruction Set Architecture......Page 371 4.2 Logic Design and the Hardware Control Language HCL......Page 387 4.3 Sequential Y86 Implementations......Page 399 4.4 General Principles of Pipelining......Page 426 4.5 Pipelined Y86 Implementations......Page 435 4.6 Summary......Page 484 Homework Problems......Page 486 Solutions to Practice Problems......Page 492 5 Optimizing Program Performance......Page 508 5.1 Capabilities and Limitations of Optimizing Compilers......Page 511 5.2 Expressing Program Performance......Page 515 5.3 Program Example......Page 517 5.4 Eliminating Loop Inefficiencies......Page 521 5.5 Reducing Procedure Calls......Page 525 5.6 Eliminating Unneeded Memory References......Page 526 5.7 Understanding Modern Processors......Page 531 5.8 Loop Unrolling......Page 544 5.9 Enhancing Parallelism......Page 548 5.10 Summary of Results for Optimizing Combining Code......Page 559 5.11 Some Limiting Factors......Page 560 5.12 Understanding Memory Performance......Page 566 5.13 Life in the Real World: Performance Improvement Techniques......Page 574 5.14 Identifying and Eliminating Performance Bottlenecks......Page 575 5.15 Summary......Page 582 Bibliographic Notes......Page 583 Homework Problems......Page 584 Solutions to Practice Problems......Page 587 6 The Memory Hierarchy......Page 594 6.1 Storage Technologies......Page 596 6.2 Locality......Page 621 6.3 The Memory Hierarchy......Page 626 6.4 Cache Memories......Page 631 6.5 Writing Cache-friendly Code......Page 650 6.6 Putting It Together: The Impact of Caches on Program Performance......Page 655 6.7 Summary......Page 664 Bibliographic Notes......Page 665 Homework Problems......Page 666 Solutions to Practice Problems......Page 677 Part II: Running Programs on a System......Page 686 7 Linking......Page 688 7.1 Compiler Drivers......Page 690 7.3 Object Files......Page 692 7.4 Relocatable Object Files......Page 693 7.5 Symbols and Symbol Tables......Page 695 7.6 Symbol Resolution......Page 698 7.7 Relocation......Page 707 7.8 Executable Object Files......Page 713 7.9 Loading Executable Object Files......Page 714 7.10 Dynamic Linking with Shared Libraries......Page 716 7.11 Loading and Linking Shared Libraries from Applications......Page 718 7.12 Position-Independent Code (PIC)......Page 722 7.13 Tools for Manipulating Object Files......Page 725 Bibliographic Notes......Page 726 Homework Problems......Page 727 Solutions to Practice Problems......Page 733 8 Exceptional Control Flow......Page 736 8.1 Exceptions......Page 738 8.2 Processes......Page 747 8.3 System Call Error Handling......Page 752 8.4 Process Control......Page 753 8.5 Signals......Page 771 8.6 Nonlocal Jumps......Page 794 8.7 Tools for Manipulating Processes......Page 797 Bibliographic Notes......Page 798 Homework Problems......Page 799 Solutions to Practice Problems......Page 806 9 Virtual Memory......Page 810 9.1 Physical and Virtual Addressing......Page 812 9.2 Address Spaces......Page 813 9.3 VM as a Tool for Caching......Page 814 9.4 VM as a Tool for Memory Management......Page 820 9.5 VM as a Tool for Memory Protection......Page 821 9.6 Address Translation......Page 822 9.7 Case Study: The Intel Core i7/Linux Memory System......Page 834 9.8 Memory Mapping......Page 842 9.9 Dynamic Memory Allocation......Page 847 9.10 Garbage Collection......Page 873 9.11 Common Memory-Related Bugs in C Programs......Page 878 Bibliographic Notes......Page 883 Homework Problems......Page 884 Solutions to Practice Problems......Page 888 Part III: Interaction and Communication Between Programs......Page 894 10 System-Level I/O......Page 896 10.1 Unix I/O......Page 897 10.2 Opening and Closing Files......Page 898 10.3 Reading and Writing Files......Page 900 10.4 Robust Reading and Writing with the Rio Package......Page 902 10.5 Reading File Metadata......Page 908 10.6 Sharing Files......Page 910 10.7 I/O Redirection......Page 912 10.8 Standard I/O......Page 914 10.9 Putting It Together: Which I/O Functions Should I Use?......Page 915 10.10 Summary......Page 916 Homework Problems......Page 917 Solutions to Practice Problems......Page 918 11 Network Programming......Page 920 11.1 The Client-Server Programming Model......Page 921 11.2 Networks......Page 922 11.3 The Global IP Internet......Page 926 11.4 The Sockets Interface......Page 935 11.5 Web Servers......Page 946 11.6 Putting It Together: The TINY Web Server......Page 954 11.7 Summary......Page 962 Homework Problems......Page 963 Solutions to Practice Problems......Page 964 12 Concurrent Programming......Page 968 12.1 Concurrent Programming with Processes......Page 970 12.2 Concurrent Programming with I/O Multiplexing......Page 974 12.3 Concurrent Programming with Threads......Page 982 12.4 Shared Variables in Threaded Programs......Page 989 12.5 Synchronizing Threads with Semaphores......Page 992 12.6 Using Threads for Parallelism......Page 1009 12.7 Other Concurrency Issues......Page 1014 12.8 Summary......Page 1023 Homework Problems......Page 1024 Solutions to Practice Problems......Page 1029 A: Error Handling......Page 1034 A.1 Error Handling in Unix Systems......Page 1035 A.2 Error-Handling Wrappers......Page 1036 References......Page 1040 A......Page 1046 B......Page 1048 C......Page 1049 D......Page 1052 E......Page 1054 F......Page 1055 G......Page 1056 H......Page 1057 I......Page 1058 J......Page 1060 L......Page 1061 M......Page 1062 O......Page 1065 P......Page 1066 R......Page 1069 S......Page 1071 T......Page 1075 U......Page 1076 W......Page 1077 Z......Page 1078 MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict MuPDF error: syntax error: invalid key in dict Cover 1 Title Page 4 Copyright 5 Contents 8 Preface 20 About the Authors 34 1 A Tour of Computer Systems 36 1.1 Information Is Bits + Context 38 1.2 Programs Are Translated by Other Programs into Different Forms 39 1.3 It Pays to Understand How Compilation Systems Work 41 1.4 Processors Read and Interpret Instructions Stored in Memory 42 1.4.1 Hardware Organization of a System 42 1.4.2 Running the hello Program 45 1.5 Caches Matter 47 1.6 Storage Devices Form a Hierarchy 48 1.7 The Operating System Manages the Hardware 49 1.7.1 Processes 51 1.7.2 Threads 52 1.7.3 Virtual Memory 52 1.7.4 Files 54 1.8 Systems Communicate with Other Systems Using Networks 55 1.9 Important Themes 56 1.9.1 Concurrency and Parallelism 56 1.9.2 The Importance of Abstractions in Computer Systems 59 1.10 Summary 60 Bibliographic Notes 61 Part I: Program Structure and Execution 62 2 Representing and Manipulating Information 64 2.1 Information Storage 68 2.2 Integer Representations 91 2.3 Integer Arithmetic 114 2.4 Floating Point 134 2.5 Summary 153 Bibliographic Notes 154 Homework Problems 154 Solutions to Practice Problems 169 3 Machine-Level Representation of Programs 188 3.1 A Historical Perspective 191 3.2 Program Encodings 194 3.3 Data Formats 202 3.4 Accessing Information 203 3.5 Arithmetic and Logical Operations 212 3.6 Control 220 3.7 Procedures 254 3.8 Array Allocation and Access 267 3.9 Heterogeneous Data Structures 276 3.10 Putting It Together: Understanding Pointers 287 3.11 Life in the Real World: Using the GDB Debugger 289 3.12 Out-of-Bounds Memory References and Buffer Overflow 291 3.13 x86-64: Extending IA32 to 64 Bits 302 3.14 Machine-Level Representations of Floating-Point Programs 327 3.15 Summary 328 Bibliographic Notes 329 Homework Problems 329 Solutions to Practice Problems 343 4 Processor Architecture 368 4.1 The Y86 Instruction Set Architecture 371 4.2 Logic Design and the Hardware Control Language HCL 387 4.3 Sequential Y86 Implementations 399 4.4 General Principles of Pipelining 426 4.5 Pipelined Y86 Implementations 435 4.6 Summary 484 Bibliographic Notes 486 Homework Problems 486 Solutions to Practice Problems 492 5 Optimizing Program Performance 508 5.1 Capabilities and Limitations of Optimizing Compilers 511 5.2 Expressing Program Performance 515 5.3 Program Example 517 5.4 Eliminating Loop Inefficiencies 521 5.5 Reducing Procedure Calls 525 5.6 Eliminating Unneeded Memory References 526 5.7 Understanding Modern Processors 531 5.8 Loop Unrolling 544 5.9 Enhancing Parallelism 548 5.10 Summary of Results for Optimizing Combining Code 559 5.11 Some Limiting Factors 560 5.12 Understanding Memory Performance 566 5.13 Life in the Real World: Performance Improvement Techniques 574 5.14 Identifying and Eliminating Performance Bottlenecks 575 5.15 Summary 582 Bibliographic Notes 583 Homework Problems 584 Solutions to Practice Problems 587 6 The Memory Hierarchy 594 6.1 Storage Technologies 596 6.2 Locality 621 6.3 The Memory Hierarchy 626 6.4 Cache Memories 631 6.5 Writing Cache-friendly Code 650 6.6 Putting It Together: The Impact of Caches on Program Performance 655 6.7 Summary 664 Bibliographic Notes 665 Homework Problems 666 Solutions to Practice Problems 677 Part II: Running Programs on a System 686 7 Linking 688 7.1 Compiler Drivers 690 7.2 Static Linking 692 7.3 Object Files 692 7.4 Relocatable Object Files 693 7.5 Symbols and Symbol Tables 695 7.6 Symbol Resolution 698 7.7 Relocation 707 7.8 Executable Object Files 713 7.9 Loading Executable Object Files 714 7.10 Dynamic Linking with Shared Libraries 716 7.11 Loading and Linking Shared Libraries from Applications 718 7.12 Position-Independent Code (PIC) 722 7.13 Tools for Manipulating Object Files 725 7.14 Summary 726 Bibliographic Notes 726 Homework Problems 727 Solutions to Practice Problems 733 8 Exceptional Control Flow 736 8.1 Exceptions 738 8.2 Processes 747 8.3 System Call Error Handling 752 8.4 Process Control 753 8.5 Signals 771 8.6 Nonlocal Jumps 794 8.7 Tools for Manipulating Processes 797 8.8 Summary 798 Bibliographic Notes 798 Homework Problems 799 Solutions to Practice Problems 806 9 Virtual Memory 810 9.1 Physical and Virtual Addressing 812 9.2 Address Spaces 813 9.3 VM as a Tool for Caching 814 9.4 VM as a Tool for Memory Management 820 9.5 VM as a Tool for Memory Protection 821 9.6 Address Translation 822 9.7 Case Study: The Intel Core i7/Linux Memory System 834 9.8 Memory Mapping 842 9.9 Dynamic Memory Allocation 847 9.10 Garbage Collection 873 9.11 Common Memory-Related Bugs in C Programs 878 9.12 Summary 883 Bibliographic Notes 883 Homework Problems 884 Solutions to Practice Problems 888 Part III: Interaction and Communication Between Programs 894 10 System-Level I/O 896 10.1 Unix I/O 897 10.2 Opening and Closing Files 898 10.3 Reading and Writing Files 900 10.4 Robust Reading and Writing with the Rio Package 902 10.5 Reading File Metadata 908 10.6 Sharing Files 910 10.7 I/O Redirection 912 10.8 Standard I/O 914 10.9 Putting It Together: Which I/O Functions Should I Use? 915 10.10 Summary 916 Bibliographic Notes 917 Homework Problems 917 Solutions to Practice Problems 918 11 Network Programming 920 11.1 The Client-Server Programming Model 921 11.2 Networks 922 11.3 The Global IP Internet 926 11.4 The Sockets Interface 935 11.5 Web Servers 946 11.6 Putting It Together: The TINY Web Server 954 11.7 Summary 962 Bibliographic Notes 963 Homework Problems 963 Solutions to Practice Problems 964 12 Concurrent Programming 968 12.1 Concurrent Programming with Processes 970 12.2 Concurrent Programming with I/O Multiplexing 974 12.3 Concurrent Programming with Threads 982 12.4 Shared Variables in Threaded Programs 989 12.5 Synchronizing Threads with Semaphores 992 12.6 Using Threads for Parallelism 1009 12.7 Other Concurrency Issues 1014 12.8 Summary 1023 Bibliographic Notes 1024 Homework Problems 1024 Solutions to Practice Problems 1029 A: Error Handling 1034 A.1 Error Handling in Unix Systems 1035 A.2 Error-Handling Wrappers 1036 References 1040 Index 1046 A 1046 B 1048 C 1049 D 1052 E 1054 F 1055 G 1056 H 1057 I 1058 J 1060 K 1061 L 1061 M 1062 N 1065 O 1065 P 1066 Q 1069 R 1069 S 1071 T 1075 U 1076 V 1077 W 1077 X 1078 Y 1078 Z 1078
For Computer Systems, Computer Organization and Architecture courses in CS, EE, and ECE departments.
Few students studying computer science or computer engineering will ever have the opportunity to build a computer system. On the other hand, most students will be required to use and program computers on a near daily basis. Computer Systems: A Programmer’s Perspective introduces the important and enduring concepts that underlie computer systems by showing how these ideas affect the correctness, performance, and utility of application programs. The text's hands-on approach (including a comprehensive set of labs) helps students understand the “under-the-hood” operation of a modern computer system and prepares them for future courses in systems topics such as compilers, computer architecture, operating systems, and networking.
Visit the CSS:AP web page http://csapp.cs.cmu.edu for more information and resources.
"Computer Systems : A Programmer's Perspective, Second Edition, introduces the important and enduring concepts that underlie computer systems by showing how these ideas affect the correctness, performance, and utility of application programs. Other systems books, written from a builder's perspective, describe how to implement the hardware or some portion of the system software, such as the operating system, compiler, or network interface. This book is written from a programmer's perspective, describing how application programmers can use their knowledge of the entire system to write better programs. Changes in hardware technology and compilers over the past decade have informed this major revision of the 2003 edition."--Jaquette du livre "Computer Systems: A Programmer's Perspective, Second Edition, introduces the important and enduring concepts that underlie computer systems by showing how these ideas affect the correctness, performance, and utility of application programs. Other systems books, written from a builder's perspective, describe how to implement the hardware or some portion of the system software, such as the operating system, compiler, or network interface. This book is written from a programmer's perspective, describing how application programmers can use their knowledge of the entire system to write better programs. Changes in hardware technology and compilers over the past decade have informed this major revision of the 2003 edition."--BOOK JACKET. Few students studying computer science or computer engineering will ever have the opportunity to build a computer system. On the other hand, most students will be required to use and program computers on a near daily basis. Computer Systems: A Programmerâ?TMs Perspective introduces the important and enduring concepts that underlie computer systems by showing how these ideas affect the correctness, performance, and utility of application programs. The texts hands-on approach (including a comprehensive set of labs) helps students understand the â?œunder-the-hoodâ? operation of a modern computer system and prepares them for future courses in systems topics such as compilers, computer architecture, operating systems, and networking.