Computer Systems: A Programmer's Perspective, Global Edition

Randal E. Bryant / David R. O'Hallaron  
Total pages
October 2015
Related Titles


For courses in Computer Science and Programming

Computer systems: A Programmer’s Perspective explains the underlying elements common among all computer systems and how they affect general application performance. Written from the programmer’s perspective, this book strives to teach students how understanding basic elements of computer systems and executing real practice can lead them to create better programs.

Spanning across computer science themes such as hardware architecture, the operating system, and systems software, the 3rd Edition serves as a comprehensive introduction to programming. This book strives to create programmers who understand all elements of computer systems and will be able to engage in any application of the field--from fixing faulty software, to writing more capable programs, to avoiding common flaws. It lays the groundwork for students to delve into more intensive topics such as computer architecture, embedded systems, and cybersecurity.

This book focuses on systems that execute an x86-64 machine code, and recommends that students have access to a Linux system for this course. Students should have basic familiarity with C or C++.


A carefully planned 12 chapter layout that covers all of the core topics of computer programming

  • Chapter 1 uses a simple “hello world” program to introduce the major concepts and themes of computer programming.
  • Chapter 2 dives into the topic of computer arithmetic, considering how numbers are represented in computer programs and how they affect value coding. The chapter places a special emphasis on the properties of unsigned and two’s-compliment number representations. It gives students necessary insight into arithmetic from the programmers perspective and why it’s so important.
  • Chapter 3 teaches students how to read the x86-64 code generated by a C compiler, covering the basic instruction patterns for different control constructs, implementation procedures, and the allocation of different data structures. This chapter also discusses the implementation of integer and floating point arithmetic and takes a machine-level view of programs to understand certain code vulnerabilities.
  • Chapter 4 introduces students to basic combinational and sequential logic elements and shows how they can be used in a simplified subset of the x86-64 instruction set called Y86-64. It starts with a single-cycle datapath and moves onto a discussion of pipelining.
  • Chapter 5 gives students techniques for improving code performance with transformations that reduce work and enhance instruction-level parallelism.
  • Chapter 6 covers different types of RAM and ROM memory systems, describing their hierarchical arrangement. The chapter makes the abstract concept tangible by using the analogy of a “memory mountain” with ridges of temporal locality and slopes of spatial locality. Students learn that improving temporal and spatial locality improves performance.
  • Chapter 7 discusses both static and dynamic linking, areas included in most systems text where programmers make their most confusing errors.
  • Chapter 8 explains exceptional control flow at all levels of the system, from simple hardware interrupts to nonlocal jumps in C that break the stack discipline. This chapter introduces the fundamental idea of a process by teaching students how it works and how it is created and manipulated from application programs.
  • Chapter 9 shows students key characteristics of the virtual memory system and how it works, addressing issues such as managing and manipulating. This chapter shows the benefits of covering the hardware and software aspects of computer systems in a unified way, which most books do not.
  • Chapter 10 covers the basic concepts of Unix I/O, such as files and descriptors. It explains how files are shared, how I/O redirection works, and how to access file metadata.
  • Chapter 11 discusses networks, I/O devices that tie together many of the ideas presented earlier in the text. It describes the client-server model that underlies all network applications and presents a programmer’s view of the internet.
  • Chapter 12 uses internet design as an example that introduces students to concurrent programming. By comparing and contrasting the three basic mechanisms for writing concurrent programs (processes, I/O multiplexing, and threads) students learn how to build concurrent internet servers.

Changes in each chapter make the text flow easier for students to understand

  • UPDATED! Chapter 1 now includes adiscussion of Amdahl’s law, originally in chapter 5.
  • UPDATED! Chapter 2 has been rewritten to simplify mathematical presentations and give students easier access to its major concepts.
  • UPDATED! Chapter 3 has been rewritten heavily based on the book’s conve

New to this Edition

  • The book now exclusively bases its presentation on x86-64

Changes in each chapter make the text flow easier for students to understand

  • UPDATED! Chapter 1 now includes adiscussion of Amdahl’s law, originally in chapter 5.
  • UPDATED! Chapter 2 has been rewritten to simplify mathematical presentations and give students easier access to its major concepts.
  • UPDATED! Chapter 3 has been rewritten heavily based on the book’s conversion from using a mix of IA32 and x86-64 software to one that solely uses the latter. This includes reorganization of major concepts and a new presentation of machine-level support for programs operating on floating-point data.
  • REVISED! Chapter 4’s earlier processor design has been revised to support 64-bit words and operations.
  • UPDATED! Chapter 5 contains new material on the performance capabilities of recent generations of x86-64 processors, which is a more reliable predictor of performance.
  • UPDATED! Chapter 6 now reflects more recent technology.
  • UPDATED! Chapter 7 has been rewritten to support x86-64. The discussion of using the GOT and PLT to create position-independent code has been expanded. There is also a new section about library interpositioning.
  • UPDATED! Chapter 8 has more in-depth information about signal handlers, including asynic-signal-safe functions, specific guidelines for writing signal handlers, and using sigsuspend to wait for handlers.
  • Chapter 10 now includes a section on files and the file hierarchy.
  • Chapter 11 introduces techniques for protocol-independent and thread-safe network programming using the modern getaddrinfo and getnameinfo functions to replace older, obsolete functions.
  • UPDATED! Chapter 12 includes greater coverage of using thread-level parallelism to make programs run faster on multi-core machines.

MasteringEngineering® not included. Students, if MasteringEngineering is a recommended/mandatory component of the course, please ask your instructor for the correct ISBN and course ID. MasteringEngineering should only be purchased when required by an instructor. Instructors, contact your Pearson representative for more information.

  • Tutorial homework problems are designed to emulate the instructor’s office-hour environment. Tutorials guide students through engineering concepts in multi-step problems that provide feedback specific to their errors and optional hints that break down the problems into smaller steps.
  • Adaptive Follow-Up Assignments are based on each student's past performance on their course work to date, including homework, tests, and quizzes. These provide additional coaching and targeted practice as needed, so students can master the material. Available for select titles.
  • With the Mastering gradebook and diagnostics, you’ll be better informed about your students’ progress than ever before. Mastering captures the step-by-step work of every student—including wrong answers submitted, hints requested, and time taken at every step of every problem—all providing insight into the most common misconceptions of your class.
  • Track student performance to ABET Learning Outcomes A, E, and K Learning Outcomes. All assignable MasteringEngineering content has been tagged to ABET Learning Outcomes a, e & k. Mastering enables you to add your own learning outcomes and associate those with MasteringEngineering content.
  • Learning CatalyticsTM enables you to generate class discussion, guide your lecture, and promote peer-to-peer learning with real-time analytics. MyLab & Mastering with eText now provides Learning Catalytics—an interactive student response to

Table of Contents

  • Part I: Program Structure and Execution
  • Chapter 1: A Tour of Computer Systems
  • Chapter 2: Representing and Manipulating Information
  • Chapter 3: Machine-Level Representation of Programs
  • Chapter 4: Processor Architecture
  • Chapter 5: Optimizing Program Performance
  • Chapter 6: The Memory Hierarchy
  • Part II: Running Programs on a System
  • Chapter 7: Linking
  • Chapter 8: Exceptional Control Flow
  • Chapter 9: Virtual Memory
  • Part III: Interaction and Communication Between Programs
  • Chapter 10: System-Level I/O
  • Chapter 11: Network Programming
  • Chapter 12: Concurrent Programming
  • Appendix
  • Error Handling