1.1 STRUCTURED COMPUTER ORGANIZATION 2 <br>1.1.1 Languages, Levels, and Virtual Machines 2 <br>1.1.2 Contemporary Multilevel Machines 5 <br>1.1.3 Evolution of Multilevel Machines 8 <br>1.2 MILESTONES IN COMPUTER ARCHITECTURE 13 <br>1.2.1 The Zeroth Generation–Mechanical Computers (1642—1945) 13 <br>1.2.2 The First Generation–Vacuum Tubes (1945—1955) 16 <br>1.2.3 The Second Generation–Transistors (1955—1965) 19 <br>1.2.4 The Third Generation–Integrated Circuits (1965—1980) 21 <br>1.2.5 The Fourth Generation–Very Large Scale Integration (1980—?) 23 <br>1.2.6 The Fifth Generation–Low-Power and Invisible Computers 26 <br>1.3 THE COMPUTER ZOO 28 <br>1.3.1 Technological and Economic Forces 28 <br>1.3.2 The Computer Spectrum 30 <br>1.3.3 Disposable Computers 31 <br>1.3.4 Microcontrollers 33 <br>1.3.5 Mobile and Game Computers 35 <br>1.3.6 Personal Computers 36 <br>1.3.7 Servers 36 <br>1.3.8 Mainframes 38 <br>1.4 EXAMPLE COMPUTER FAMILIES 39 <br>1.4.1 Introduction to the x86 Architecture 39 <br>1.4.2 Introduction to the ARM Architecture 45 <br>1.4.3 Introduction to the AVR Architecture 47 <br>1.5 METRIC UNITS 49 <br>1.6 OUTLINE OF THIS BOOK 50 <br> 2.1 PROCESSORS 55 <br>2.1.1 CPU Organization 56 <br>2.1.2 Instruction Execution 58 <br>2.1.3 RISC versus CISC 62 <br>2.1.4 Design Principles for Modern Computers 63 <br>2.1.5 Instruction-Level Parallelism 65 <br>2.1.6 Processor-Level Parallelism 69 <br>2.2 PRIMARYMEMORY 73 <br>2.2.1 Bits 74 <br>2.2.2 Memory Addresses 74 <br>2.2.3 Byte Ordering 76 <br>2.2.4 Error-Correcting Codes 78 <br>2.2.5 Cache Memory 82 <br>2.2.6 Memory Packaging and Types 85 <br>2.3 SECONDARYMEMORY 86 <br>2.3.1 Memory Hierarchies 86 <br>2.3.2 Magnetic Disks 87 <br>2.3.3 IDE Disks 91 <br>2.3.4 SCSI Disks 92 <br>2.3.5 RAID 94 <br>2.3.6 Solid-State Disks 97 <br>2.3.7 CD-ROMs 99 <br>2.3.8 CD-Recordables 103 <br>2.3.9 CD-Rewritables 105 <br>2.3.10 DVD 106 <br>2.3.11 Blu-ray 108 <br>2.4 INPUT/OUTPUT 108 <br>2.4.1 Buses 108 <br>2.4.2 Terminals 113 <br>2.4.3 Mice 118 <br>2.4.4 Game Controllers 120 <br>2.4.5 Printers 122 <br>2.4.6 Telecommunications Equipment 127 <br>2.4.7 Digital Cameras 135 <br>2.4.8 Character Codes 137 <br>2.5 SUMMARY 142 <br> 3.1 GATES AND BOOLEAN ALGEBRA 147 <br>3.1.1 Gates 148 <br>3.1.2 Boolean Algebra 150 <br>3.1.3 Implementation of Boolean Functions 152 <br>3.1.4 Circuit Equivalence 153 <br>3.2 BASIC DIGITAL LOGIC CIRCUITS 158 <br>3.2.1 Integrated Circuits 158 <br>3.2.2 Combinational Circuits 159 <br>3.2.3 Arithmetic Circuits 163 <br>3.2.4 Clocks 168 <br>3.3 MEMORY 169 <br>3.3.1 Latches 169 <br>3.3.2 Flip-Flops 172 <br>3.3.3 Registers 174 <br>3.3.4 Memory Organization 174 <br>3.3.5 Memory Chips 178 <br>3.3.6 RAMs and ROMs 180 <br>3.4 CPU CHIPS AND BUSES 185 <br>3.4.1 CPU Chips 185 <br>3.4.2 Computer Buses 187 <br>3.4.3 Bus Width 190 <br>3.4.4 Bus Clocking 191 <br>3.4.5 Bus Arbitration 196 <br>3.4.6 Bus Operations 198 <br>3.5 EXAMPLE CPU CHIPS 201 <br>3.5.1 The Intel Core i7 201 <br>3.5.2 The Texas Instruments OMAP4430 System-on-a-Chip 208 <br>3.5.3 The Atmel ATmega168 Microcontroller 212 <br>3.6 EXAMPLE BUSES 214 <br>3.6.1 The PCI Bus 215 <br>3.6.2 PCI Express 223 <br>3.6.3 The Universal Serial Bus 228 <br>3.7 INTERFACING 232 <br>3.7.1 I/O Interfaces 232 <br>3.7.2 Address Decoding 233 <br>3.8 SUMMARY 235 <br> 4.1 AN EXAMPLE MICROARCHITECTURE 243 <br>4.1.1 The Data Path 244 <br>4.1.2 Microinstructions 251 <br>4.1.3 Microinstruction Control: The Mic-1 253 <br>4.2 AN EXAMPLE ISA: IJVM 258 <br>4.2.1 Stacks 258 <br>4.2.2 The IJVM Memory Model 260 <br>4.2.3 The IJVM Instruction Set 262 <br>4.2.4 Compiling Java to IJVM 266 <br>4.3 AN EXAMPLE IMPLEMENTATION 267 <br>4.3.1 Microinstructions and Notation 267 <br>4.3.2 Implementation of IJVM Using the Mic-1 272 <br>4.4 DESIGN OF THE MICROARCHITECTURE LEVEL 283 <br>4.4.1 Speed versus Cost 283 <br>4.4.2 Reducing the Execution Path Length 286 <br>4.4.3 A Design with Prefetching: The Mic-2 293 <br>4.4.4 A Pipelined Design: The Mic-3 293 <br>4.4.5 A Seven-Stage Pipeline: The Mic-4 301 <br>4.5 IMPROVING PERFORMANCE 305 <br>4.5.1 Cache Memory 306 <br>4.5.2 Branch Prediction 312 <br>4.5.3 Out-of-Order Execution and Register Renaming 317 <br>4.5.4 Speculative Execution 322 <br>4.6 EXAMPLES OF THE MICROARCHITECTURE LEVEL 324 <br>4.6.1 The Microarchitecture of the Core i7 CPU 325 <br>4.6.2 The Microarchitecture of the OMAP4430 CPU 331 <br>4.6.3 The Microarchitecture of the ATmega168 Microcontroller 336 <br>4.7 COMPARISON OF THE I7, OMAP4430, AND ATMEGA168 338 <br>4.8 SUMMARY 339 <br> 5.1 OVERVIEW OF THE ISA LEVEL <br>5.1.1 Properties of the ISA Level <br>5.1.2 Memory Models <br>5.1.3 Registers <br>5.1.4 Instructions <br>5.1.5 Overview of the Core i7 ISA Level <br>5.1.6 Overview of the OMAP4430 ARM ISA Level <br>5.1.7 Overview of the ATmega168 AVR ISA Level <br>5.2 DATA TYPES <br>5.2.1 Numeric Data Types <br>5.2.2 Nonnumeric Data Types <br>5.2.3 Data Types on the Core i7 <br>5.2.4 Data Types on the OMAP4430 ARM CPU <br>5.2.5 Data Types on the ATmega168 AVR CPU <br>5.3 INSTRUCTION FORMATS <br>5.3.1 Design Criteria for Instruction Formats <br>5.3.2 Expanding Opcodes <br>5.3.3 The Core i7 Instruction Formats <br>5.3.4 The OMAP4430 ARM CPU Instruction Formats <br>5.3.5 The ATmega168 AVR Instruction Formats <br>5.4 ADDRESSING <br>5.4.1 Addressing Modes <br>5.4.2 Immediate Addressing <br>5.4.3 Direct Addressing <br>5.4.4 Register Addressing <br>5.4.5 Register Indirect Addressing <br>5.4.6 Indexed Addressing <br>5.4.7 Based-Indexed Addressing <br>5.4.8 Stack Addressing <br>5.4.9 Addressing Modes for Branch Instructions <br>5.4.10 Orthogonality of Opcodes and Addressing Modes <br>5.4.11 The Core i7 Addressing Modes <br>5.4.12 The OMAP4440 ARM CPU Addressing Modes <br>5.4.13 The ATmega168 AVR Addressing Modes <br>5.4.14 Discussion of Addressing Modes <br>5.5 INSTRUCTION TYPES <br>5.5.1 Data Movement Instructions <br>5.5.2 Dyadic Operations <br>5.5.3 Monadic Operations <br>5.5.4 Comparisons and Conditional Branches <br>5.5.5 Procedure Call Instructions <br>5.5.6 Loop Control <br>5.5.7 Input/Output <br>5.5.8 The Core i7 Instructions <br>5.5.9 The OMAP4430 ARM CPU Instructions <br>5.5.10 The ATmega168 AVR Instructions <br>5.5.11 Comparison of Instruction Sets <br>5.6 FLOWOF CONTROL <br>5.6.1 Sequential Flow of Control and Branches <br>5.6.2 Procedures <br>5.6.3 Coroutines <br>5.6.4 Traps <br>5.6.5 Interrupts <br>5.7 A DETAILED EXAMPLE: THE TOWERS OF HANOI <br>5.7.1 The Towers of Hanoi in Core i7 Assembly Language <br>5.7.2 The Towers of Hanoi in OMAP4430 ARM Assembly Language <br>5.8 THE IA-64 ARCHITECTURE AND THE ITANIUM 2 <br>5.8.1 The Problem with the IA-32 ISA <br>5.8.2 The IA-64 Model: Explicitly Parallel Instruction Computing <br>5.8.3 Reducing Memory References <br>5.8.4 Instruction Scheduling <br>5.8.5 Reducing Conditional Branches: Predication <br>5.8.6 Speculative Loads <br>5.9 SUMMARY <br> 6.1 VIRTUAL MEMORY <br>6.1.1 Paging <br>6.1.2 Implementation of Paging <br>6.1.3 Demand Paging and the Working Set Model <br>6.1.4 Page Replacement Policy <br>6.1.5 Page Size and Fragmentation <br>6.1.6 Segmentation <br>6.1.7 Implementation of Segmentation <br>6.1.8 Virtual Memory on the Core i7 <br>6.1.9 Virtual Memory on the OMAP4430 ARM CPU <br>6.1.10 Virtual Memory and Caching <br>6.2 VIRTUAL I/O INSTRUCTIONS <br>6.2.1 Files <br>6.2.2 Implementation of Virtual I/O Instructions <br>6.2.3 Directory Management Instructions <br>6.3 VIRTUAL INSTRUCTIONS FOR PARALLEL PROCESSING <br>6.3.1 Process Creation <br>6.3.2 Race Conditions <br>6.3.3 Process Synchronization Using Semaphores <br>6.4 EXAMPLE OPERATING SYSTEMS <br>6.4.1 Introduction <br>6.4.2 Examples of Virtual Memory <br>6.4.3 Examples of Virtual I/O <br>6.4.4 Examples of Process Management <br>6.5 SUMMARY <br> 7.1 INTRODUCTION TO ASSEMBLY LANGUAGE <br>7.1.1 What Is an Assembly Language? <br>7.1.2 Why Use Assembly Language? <br>7.1.3 Format of an Assembly Language Statement <br>7.1.4 Pseudoinstructions <br>7.2 MACROS <br>7.2.1 Macro Definition, Call, and Expansion <br>7.2.2 Macros with Parameters <br>7.2.3 Advanced Features <br>7.2.4 Implementation of a Macro Facility in an Assembler <br>7.3 THE ASSEMBLY PROCESS <br>7.3.1 Two-Pass Assemblers <br>7.3.2 Pass One <br>7.3.3 Pass Two <br>7.3.4 The Symbol Table <br>7.4 LINKING AND LOADING <br>7.4.1 Tasks Performed by the Linker <br>7.4.2 Structure of an Object Module <br>7.4.3 Binding Time and Dynamic Relocation <br>7.4.4 Dynamic Linking <br>7.5 SUMMARY <br> 8.1 ON-CHIP PARALELLISM <br>8.1.1 Instruction-Level Parallelism <br>8.1.2 On-Chip Multithreading <br>8.1.3 Single-Chip Multiprocessors <br>8.2 COPROCESSORS <br>8.2.1 Network Processors <br>8.2.2 Media Processors <br>8.2.3 Cryptoprocessors <br>8.3 SHARED-MEMORYMULTIPROCESSORS <br>8.3.1 Multiprocessors vs. Multicomputers <br>8.3.2 Memory Semantics <br>8.3.3 UMA Symmetric Multiprocessor Architectures <br>8.3.4 NUMA Multiprocessors <br>8.3.5 COMA Multiprocessors <br>8.4 MESSAGE-PASSING MULTICOMPUTERS <br>8.4.1 Interconnection Networks <br>8.4.2 MPPs–Massively Parallel Processors <br>8.4.3 Cluster Computing <br>8.4.4 Communication Software for Multicomputers <br>8.4.5 Scheduling <br>8.4.6 Application-Level Shared Memory <br>8.4.7 Performance <br>8.5 GRID COMPUTING <br>8.6 SUMMARY <br> 9.1 SUGGESTIONS FOR FURTHER READING <br>9.1.1 Introduction and General Works <br>9.1.2 Computer Systems Organization <br>9.1.3 The Digital Logic Level <br>9.1.4 The Microarchitecture Level <br>9.1.5 The Instruction Set Architecture Level <br>9.1.6 The Operating System Machine Level <br>9.1.7 The Assembly Language Level <br>9.1.8 Parallel Computer Architectures <br>9.1.9 Binary and Floating-Point Numbers <br>9.1.10 Assembly Language Programming <br>9.2 ALPHABETICAL BIBLIOGRAPHY <br>A.1 FINITE-PRECISION NUMBERS <br>A.2 RADIX NUMBER SYSTEMS <br>A.3 CONVERSION FROM ONE RADIX TO ANOTHER <br>A.4 NEGATIVE BINARY NUMBERS <br>A.5 BINARY ARITHMETIC <br>B.1 PRINCIPLES OF FLOATING POINT <br>B.2 IEEE FLOATING-POINT STANDARD 754 <br>C.1 OVERVIEW <br>C.1.1 Assembly Language <br>C.1.2 A Small Assembly Language Program <br>C.2 THE 8088 PROCESSOR <br>C.2.1 The Processor Cycle <br>C.2.2 The General Registers <br>C.2.3 Pointer Registers <br>C.3 MEMORY AND ADDRESSING <br>C.3.1 Memory Organization and Segments <br>C.3.2 Addressing <br>C.4 THE 8088 INSTRUCTION SET <br>C.4.1 Move, Copy and Arithmetic <br>C.4.2 Logical, Bit and Shift Operations <br>C.4.3 Loop and Repetitive String Operations <br>C.4.4 Jump and Call Instructions <br>C.4.5 Subroutine Calls <br>C.4.6 System Calls and System Subroutines <br>C.4.7 Final Remarks on the Instruction Set <br>C.5 THE ASSEMBLER <br>C.5.1 Introduction <br>C.5.2 The ACK-Based Assembler, as88 <br>C.5.3 Some Differences with Other 8088 Assemblers <br>C.6 THE TRACER <br>C.6.1 Tracer Commands <br>C.7 GETTING STARTED <br>C.8 EXAMPLES <br>C.8.1 Hello World Example <br>C.8.2 General Registers Example <br>C.8.3 Call Command and Pointer Registers <br>C.8.4 Debugging an Array Print Program <br>C.8.5 String Manipulation and String Instructions <br>C.8.6 Dispatch Tables <br>C.8.7 Buffered and Random File Access <br> <br>