Modern Computer Architecture and Organization - Second Edition

Book description

A no-nonsense, practical guide to current and future processor and computer architectures that enables you to design computer systems and develop better software applications across a variety of domains

Key Features

  • Understand digital circuitry through the study of transistors, logic gates, and sequential logic
  • Learn the architecture of x86, x64, ARM, and RISC-V processors, iPhones, and high-performance gaming PCs
  • Study the design principles underlying the domains of cybersecurity, bitcoin, and self-driving cars

Book Description

Are you a software developer, systems designer, or computer architecture student looking for a methodical introduction to digital device architectures, but are overwhelmed by the complexity of modern systems? This step-by-step guide will teach you how modern computer systems work with the help of practical examples and exercises. You’ll gain insights into the internal behavior of processors down to the circuit level and will understand how the hardware executes code developed in high-level languages.

This book will teach you the fundamentals of computer systems including transistors, logic gates, sequential logic, and instruction pipelines. You will learn details of modern processor architectures and instruction sets including x86, x64, ARM, and RISC-V. You will see how to implement a RISC-V processor in a low-cost FPGA board and write a quantum computing program and run it on an actual quantum computer.

This edition has been updated to cover the architecture and design principles underlying the important domains of cybersecurity, blockchain and bitcoin mining, and self-driving vehicles.

By the end of this book, you will have a thorough understanding of modern processors and computer architecture and the future directions these technologies are likely to take.

What you will learn

  • Understand the fundamentals of transistor technology and digital circuits
  • Explore the concepts underlying pipelining and superscalar processing
  • Implement a complete RISC-V processor in a low-cost FPGA
  • Understand the technology used to implement virtual machines
  • Learn about security-critical computing applications like financial transaction processing
  • Get up to speed with blockchain and the hardware architectures used in bitcoin mining
  • Explore the capabilities of self-navigating vehicle computing architectures
  • Write a quantum computing program and run it on a real quantum computer

Who this book is for

This book is for software developers, computer engineering students, system designers, reverse engineers, and anyone looking to understand the architecture and design principles underlying modern computer systems: ranging from tiny, embedded devices to warehouse-size cloud server farms. A general understanding of computer processors is helpful but not required.

Table of contents

  1. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Get in touch
  2. Introducing Computer Architecture
    1. Technical requirements
    2. The evolution of automated computing devices
      1. Charles Babbage’s Analytical Engine
      2. ENIAC
      3. IBM PC
        1. The Intel 8088 microprocessor
        2. The Intel 80286 and 80386 microprocessors
      4. The iPhone
    3. Moore’s law
    4. Computer architecture
      1. Representing numbers with voltage levels
      2. Binary and hexadecimal numbers
      3. The 6502 microprocessor
      4. The 6502 instruction set
    5. Summary
    6. Exercises
  3. Digital Logic
    1. Technical requirements
    2. Electrical circuits
    3. The transistor
    4. Logic gates
    5. Latches
    6. Flip-flops
    7. Registers
    8. Adders
      1. Propagation delay
    9. Clocking
    10. Sequential logic
    11. Hardware description languages
      1. VHDL
    12. Summary
    13. Exercises
  4. Processor Elements
    1. Technical requirements
    2. A simple processor
      1. Control unit
        1. Executing an instruction – a simple example
      2. Arithmetic logic unit
      3. Registers
    3. The instruction set
    4. Addressing modes
      1. Immediate addressing mode
      2. Absolute addressing mode
      3. Absolute indexed addressing mode
      4. Indirect indexed addressing mode
    5. Instruction categories
      1. Memory load and store instructions
      2. Register-to-register data transfer instructions
      3. Stack instructions
      4. Arithmetic instructions
      5. Logical instructions
      6. Branching instructions
      7. Subroutine call and return instructions
      8. Processor flag instructions
      9. Interrupt-related instructions
      10. No operation instruction
    6. Interrupt processing
      1. processing
      2. processing
      3. BRK instruction processing
    7. Input/output operations
      1. Programmed I/O
      2. Interrupt-driven I/O
      3. Direct memory access
    8. Summary
    9. Exercises
  5. Computer System Components
    1. Technical requirements
    2. Memory subsystem
    3. Introducing the MOSFET
    4. Constructing DRAM circuits with MOSFETs
      1. The capacitor
      2. The DRAM bit cell
      3. DDR5 SDRAM
      4. Graphics DDR
      5. Prefetching
    5. I/O subsystem
      1. Parallel and serial data buses
      2. PCI Express
      3. SATA
      4. M.2
      5. USB
      6. Thunderbolt
    6. Graphics displays
      1. VGA
      2. DVI
      3. HDMI
      4. DisplayPort
    7. Network interface
      1. Ethernet
      2. Wi-Fi
    8. Keyboard and mouse
      1. Keyboard
      2. Mouse
    9. Modern computer system specifications
    10. Summary
    11. Exercises
  6. Hardware-Software Interface
    1. Technical requirements
    2. Device drivers
      1. The parallel port
      2. PCIe device drivers
      3. Device driver structure
    3. BIOS
      1. UEFI
    4. The boot process
      1. BIOS boot
      2. UEFI boot
      3. Trusted boot
      4. Embedded devices
    5. Operating systems
    6. Processes and threads
      1. Scheduling algorithms and process priority
    7. Multiprocessing
    8. Summary
    9. Exercises
  7. Specialized Computing Domains
    1. Technical requirements
    2. Real-time computing
      1. Real-time operating systems
    3. Digital signal processing
      1. ADCs and DACs
      2. DSP hardware features
      3. Signal processing algorithms
        1. Convolution
        2. Digital filtering
        3. Fast Fourier transform (FFT)
    4. GPU processing
      1. GPUs as data processors
        1. Big data
        2. Deep learning
    5. Examples of specialized architectures
    6. Summary
    7. Exercises
  8. Processor and Memory Architectures
    1. Technical requirements
    2. The von Neumann, Harvard, and modified Harvard architectures
      1. The von Neumann architecture
      2. The Harvard architecture
      3. The modified Harvard architecture
    3. Physical and virtual memory
      1. Paged virtual memory
      2. Page status bits
      3. Memory pools
    4. Memory management unit
    5. Summary
    6. Exercises
  9. Performance-Enhancing Techniques
    1. Technical requirements
    2. Cache memory
      1. Multilevel processor caches
      2. Static RAM
      3. Level 1 cache
      4. Direct-mapped cache
      5. Set associative cache
      6. Processor cache write policies
      7. Level 2 and level 3 processor caches
    3. Instruction pipelining
      1. Superpipelining
      2. Pipeline hazards
      3. Micro-operations and register renaming
      4. Conditional branches
    4. Simultaneous multithreading
    5. SIMD processing
    6. Summary
    7. Exercises
  10. Specialized Processor Extensions
    1. Technical requirements
    2. Privileged processor modes
      1. Handling interrupts and exceptions
      2. Protection rings
      3. Supervisor mode and user mode
      4. System calls
    3. Floating-point arithmetic
      1. The 8087 floating-point coprocessor
      2. The IEEE 754 floating-point standard
    4. Power management
      1. Dynamic voltage frequency scaling
    5. System security management
      1. Trusted Platform Module
      2. Thwarting cyberattackers
    6. Summary
    7. Exercises
  11. Modern Processor Architectures and Instruction Sets
    1. Technical requirements
    2. x86 architecture and instruction set
      1. The x86 register set
      2. x86 addressing modes
        1. Implied addressing
        2. Register addressing
        3. Immediate addressing
        4. Direct memory addressing
        5. Register indirect addressing
        6. Indexed addressing
        7. Based indexed addressing
        8. Based indexed addressing with scaling
      3. x86 instruction categories
        1. Data movement
        2. Stack manipulation
        3. Arithmetic and logic
        4. Conversions
        5. Control flow
        6. String manipulation
        7. Flag manipulation
        8. Input/output
        9. Protected mode
        10. Miscellaneous instructions
        11. Other instruction categories
        12. Common instruction patterns
      4. x86 instruction formats
      5. x86 assembly language
    3. x64 architecture and instruction set
      1. The x64 register set
      2. x64 instruction categories and formats
      3. x64 assembly language
    4. 32-bit ARM architecture and instruction set
      1. The ARM register set
      2. ARM addressing modes
        1. Immediate
        2. Register direct
        3. Register indirect
        4. Register indirect with offset
        5. Register indirect with offset, pre-incremented
        6. Register indirect with offset, post-incremented
        7. Double register indirect
        8. Double register indirect with scaling
      3. ARM instruction categories
        1. Load/store
        2. Stack manipulation
        3. Register movement
        4. Arithmetic and logic
        5. Comparisons
        6. Control flow
        7. Supervisor mode
        8. Breakpoint
        9. Conditional execution
        10. Other instruction categories
      4. 32-bit ARM assembly language
    5. 64-bit ARM architecture and instruction set
      1. 64-bit ARM assembly language
    6. Summary
    7. Exercises
  12. The RISC-V Architecture and Instruction Set
    1. Technical requirements
    2. The RISC-V architecture and applications
    3. The RISC-V base instruction set
      1. Computational instructions
      2. Control flow instructions
      3. Memory access instructions
      4. System instructions
      5. Pseudo-instructions
      6. Privilege levels
    4. RISC-V extensions
      1. The M extension
      2. The A extension
      3. The C extension
      4. The F and D extensions
      5. Other extensions
    5. RISC-V variants
    6. 64-bit RISC-V
    7. Standard RISC-V configurations
    8. RISC-V assembly language
    9. Implementing RISC-V in an FPGA
    10. Summary
    11. Exercises
  13. Processor Virtualization
    1. Technical requirements
    2. Introducing virtualization
      1. Types of virtualization
        1. Operating system virtualization
        2. Application virtualization
        3. Network virtualization
        4. Storage virtualization
      2. Categories of processor virtualization
        1. Trap-and-emulate virtualization
        2. Paravirtualization
        3. Binary translation
        4. Hardware emulation
    3. Virtualization challenges
      1. Unsafe instructions
      2. Shadow page tables
      3. Security
    4. Virtualizing modern processors
      1. x86 processor virtualization
        1. x86 hardware virtualization
      2. ARM processor virtualization
      3. RISC-V processor virtualization
    5. Virtualization tools
      1. VirtualBox
      2. VMware Workstation
      3. VMware ESXi
      4. KVM
      5. Xen
      6. QEMU
    6. Virtualization and cloud computing
      1. Electrical power consumption
    7. Summary
    8. Exercises
  14. Domain-Specific Computer Architectures
    1. Technical requirements
    2. Architecting computer systems to meet unique requirements
    3. Smartphone architecture
      1. iPhone 13 Pro Max
    4. Personal computer architecture
      1. Alienware Aurora Ryzen Edition R10 gaming desktop
        1. Ryzen 9 5950X branch prediction
        2. Nvidia GeForce RTX 3090 GPU
        3. Aurora subsystems
    5. Warehouse-scale computing architecture
      1. WSC hardware
      2. Rack-based servers
      3. Hardware fault management
      4. Electrical power consumption
      5. The WSC as a multilevel information cache
      6. Deploying a cloud application
    6. Neural networks and machine learning architectures
      1. Intel Nervana neural network processor
    7. Summary
    8. Exercises
  15. Cybersecurity and Confidential Computing Architectures
    1. Technical requirements
    2. Cybersecurity threats
      1. Cybersecurity threat categories
      2. Cyberattack techniques
      3. Types of malware
      4. Post-exploitation actions
    3. Features of secure hardware
      1. Identify what needs to be protected
      2. Anticipate all types of attacks
      3. Features of secure system design
        1. Secure key storage
        2. Encryption of data at rest
        3. Encryption of data in transit
        4. Cryptographically secure key generation
        5. Secure boot procedure
        6. Tamper-resistant hardware design
    4. Confidential computing
    5. Designing for security at the architectural level
      1. Avoid security through obscurity
      2. Comprehensive secure design
      3. The principle of least privilege
      4. Zero trust architecture
    6. Ensuring security in system and application software
      1. Common software weaknesses
        1. Buffer overflow
        2. Cross-site scripting
        3. SQL injection
        4. Path traversal
      2. Source code security scans
    7. Summary
    8. Exercises
  16. Blockchain and Bitcoin Mining Architectures
    1. Technical requirements
    2. Introduction to blockchain and bitcoin
      1. The SHA-256 hash algorithm
      2. Computing SHA-256
      3. Bitcoin core software
    3. The bitcoin mining process
      1. Bitcoin mining pools
      2. Mining with a CPU
      3. Mining with a GPU
    4. Bitcoin mining computer architectures
      1. Mining with FPGAs
      2. Mining with ASICs
      3. Bitcoin mining economics
    5. Alternative types of cryptocurrency
    6. Summary
    7. Exercises
  17. Self-Driving Vehicle Architectures
    1. Technical requirements
    2. Overview of self-driving vehicles
      1. Driving autonomy levels
    3. Safety concerns of self-driving vehicles
    4. Hardware and software requirements for self-driving vehicles
      1. Sensing vehicle state and the surroundings
        1. GPS, speedometer, and inertial sensors
        2. Video cameras
        3. Radar
        4. Lidar
        5. Sonar
      2. Perceiving the environment
        1. Convolutional neural networks
        2. Example CNN implementation
        3. CNNs in autonomous driving applications
        4. Lidar localization
        5. Object tracking
      3. Decision processing
        1. Lane keeping
        2. Complying with the rules of the road
        3. Avoiding objects
        4. Planning the vehicle path
    5. Autonomous vehicle computing architecture
      1. Tesla HW3 Autopilot
    6. Summary
    7. Exercises
  18. Quantum Computing and Other Future Directions in Computer Architectures
    1. Technical requirements
    2. The ongoing evolution of computer architectures
    3. Extrapolating from current trends
      1. Moore’s law revisited
      2. The third dimension
      3. Increased device specialization
    4. Potentially disruptive technologies
      1. Quantum physics
      2. Spintronics
      3. Quantum computing
      4. Quantum code-breaking
      5. Adiabatic quantum computation
      6. The future of quantum computing
      7. Carbon nanotubes
    5. Building a future-tolerant skill set
      1. Continuous learning
      2. College education
      3. Conferences and literature
    6. Summary
    7. Exercises
  19. Appendix
    1. Answers to Exercises
    2. Chapter 1: Introducing Computer Architecture
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
      9. Exercise 5
      10. Answer
      11. Exercise 6
      12. Answer
    3. Chapter 2: Digital Logic
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
      9. Exercise 5
      10. Answer
      11. Exercise 6
      12. Answer
    4. Chapter 3: Processor Elements
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
      9. Exercise 5
      10. Answer
      11. Exercise 6
      12. Answer
    5. Chapter 4: Computer System Components
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
    6. Chapter 5: Hardware-Software Interface
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
    7. Chapter 6: Specialized Computing Domains
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    8. Chapter 7: Processor and Memory Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    9. Chapter 8: Performance-Enhancing Techniques
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    10. Chapter 9: Specialized Processor Extensions
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
      9. Exercise 5
      10. Answer
      11. Exercise 6
      12. Answer
      13. Exercise 7
      14. Answer
      15. Exercise 8
      16. Answer
    11. Chapter 10: Modern Processor Architectures and Instruction Sets
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
      9. Exercise 5
      10. Answer
      11. Exercise 6
      12. Answer
      13. Exercise 7
      14. Answer
      15. Exercise 8
      16. Answer
    12. Chapter 11: The RISC-V Architecture and Instruction Set
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    13. Chapter 12: Processor Virtualization
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    14. Chapter 13: Domain-Specific Computer Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
    15. Chapter 14: Cybersecurity and Confidential Computing Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
    16. Chapter 15: Blockchain and Bitcoin Mining Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
    17. Chapter 16: Self-Driving Vehicle Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
    18. Chapter 17: Future Directions in Computer Architectures
      1. Exercise 1
      2. Answer
      3. Exercise 2
      4. Answer
      5. Exercise 3
      6. Answer
      7. Exercise 4
      8. Answer
  20. Other Books You May Enjoy
  21. Index

Product information

  • Title: Modern Computer Architecture and Organization - Second Edition
  • Author(s): Jim Ledin
  • Release date: May 2022
  • Publisher(s): Packt Publishing
  • ISBN: 9781803234519