Introduction To Computer Architecture

1.1 Introduction

  • Civilization advances by performing important operations without conscious thought.

  • The information technology industry is vibrant and responsible for almost 10% of the U.S. gross national product (GNP).

  • Innovation occurs at a rapid pace in the computing industry.

  • Computer industry advancements have led to improvements that would allow hypothetical travel from New York to London in one second for a penny.

  • Computers have sparked a third civilization revolution - the information revolution - alongside the agricultural and industrial revolutions.

  • Computational scientists have joined theoretical and experimental scientists in various fields to explore new frontiers.

  • Each tenfold improvement in computing cost leads to multiplied opportunities for computer applications.

    • Examples of applications that were once considered "computer science fiction" but are now reality:

      • Computers in automobiles: Microprocessors have improved engine controls and safety systems.

      • Cell phones: Computer systems have allowed for mobile communication globally.

      • Human genome project: Computer equipment is used to map and analyze human DNA sequences.

      • World Wide Web: The web has transformed society, replacing libraries and newspapers for many.

      • Search engines: Essential for finding relevant information on the web.

  • Hardware advancements have enabled programmers to create useful software, making computers ubiquitous.

  • Killer applications of the future include glasses that augment reality, cashless societies, and self-driving cars.

Classes of Computing Applications

  • Computers utilize a common set of hardware technologies but cater to different design requirements based on their application.

  • Computers are broadly classified into personal computers, servers, and embedded computers.

  • Personal Computer (PC):

    • Designed for use by an individual, incorporating a graphics display, a keyboard, and a mouse.

    • Emphasize delivering good performance to single users at low cost.

    • Usually execute third-party software.

  • Embedded Computer:

    • A computer inside another device, running a predetermined application or software collection.

    • Often have unique application requirements that combine performance with limitations on cost or power.

    • Designed to run one application or a set of related applications integrated with the hardware and delivered as a single system.

    • Despite the large number of embedded computers, most users are unaware they are using one.

  • Server:

    • A computer for running larger programs for multiple users simultaneously, accessed via a network.

    • Oriented to carrying large workloads, either single complex applications or handling many small jobs.

    • Built from the same basic technology as desktop computers but with greater computing, storage, and input/output capacity.

    • Place a greater emphasis on dependability than PCs.

    • Span a wide range in cost and capability.

      • Low-end servers are similar to desktop computers.

      • Supercomputers consist of tens of thousands of processors, terabytes of memory, and cost millions of dollars.

  • Supercomputer:

    • A class of high-performance and high-cost computers configured as servers.

    • Used for scientific and engineering calculations, such as weather forecasting and oil exploration.

    • Represent a small fraction of the server market.

Welcome to the PostPC Era

  • Generational changes in computer hardware are reshaping the information technology industry.

  • The personal mobile device (PMD) is replacing the PC. These devices are:

    • Battery operated.

    • Have wireless internet connectivity.

    • Cost hundreds of dollars.

    • Run downloadable software (apps).

    • Rely on touch-sensitive screens or speech input instead of keyboards and mice.

    • Examples: Smartphones and tablets (potentially electronic glasses in the future).

  • Cloud computing is replacing the traditional server, utilizing Warehouse Scale Computers (WSCs).

    • Amazon and Google build WSCs containing 50,000 servers and rent portions to companies.

  • Software as a Service (SaaS) is revolutionizing the software industry, with applications running partly on PMDs and partly in the Cloud.

  • Cloud computing refers to large server collections providing services over the Internet, with dynamically varying server rentals.

  • Software as a Service (SaaS) delivers software and data as a service over the Internet, typically via a browser.

    • Examples include web search and social networking.

What You Can Learn in This Book

  • Knowledge of computer organization is essential for programmers interested in performance.

  • Programmers need to understand the parallel nature of processors and the hierarchical nature of memories.

  • Today's programmers need to worry about energy efficiency.

  • Key questions addressed in the book:

    • How high-level language programs are translated into hardware language and executed.

    • The interface between software and hardware and how software instructs hardware.

    • What determines program performance and how to improve it.

    • Techniques used by hardware designers to improve performance and energy efficiency.

    • The reasons and consequences of the switch from sequential to parallel processing.

    • Great ideas from computer architects that laid the foundation of modern computing.

  • Understanding these concepts allows programs to be improved and computers to be accurately evaluated.

  • The first chapter introduces basic ideas, definitions, major components, performance evaluation, integrated circuits, and the shift to multicores.

  • Acronyms are used to precisely describe functions and capabilities.

    • Example: CPU for Central Processing Unit and Random Access Memory

  • Acronym: A word constructed by taking the initial letters of a string of words.

  • Performance of a program depends on algorithms, software systems, and the computer's execution effectiveness, including input/output (I/O) operations.

    Terabyte (TB)=1012bytes\text{Terabyte (TB)} = 10^{12} \text{bytes}
    Tebibyte (TiB)=240bytes\text{Tebibyte (TiB)} = 2^{40} \text{bytes}

1.2 Seven Great Ideas in Computer Architecture

  • Computer architects have invented powerful ideas over the last 60 years that have shaped computer design.

  • These great ideas are themes that we will weave through this and subsequent chapters as examples arise.

  • We introduce icons and highlighted terms to represent the great ideas and use them to identify the nearly 100 sections of the book that feature use of the great ideas.

  • Use abstraction to simplify design:

    • Use abstractions to represent the design at different levels of representation; lower-level details are hidden to offer a simpler model at higher levels.

  • Make the common case fast:

    • Enhance performance by optimizing the common case, which is often simpler than the rare case.

    • Requires careful experimentation and measurement.

  • Performance via parallelism:

    • Get more performance by performing operations in parallel.

  • Performance via pipelining:

    • Move multiple operations through hardware units, analogous to water flowing through a pipeline.

  • Performance via prediction:

    • Guess and start working rather than wait until you know for sure, assuming recovery from misprediction is inexpensive and predictions are accurate.

  • Hierarchy of memories:

    • Address the conflicting demands of fast, large, and cheap memory with a hierarchy of memories.

    • Caches give illusion that main memory is nearly as fast as the top of the hierarchy and nearly as big and cheap as the bottom of the hierarchy.

  • Dependability via redundancy:

    • Make systems dependable by including redundant components that can take over when a failure occurs and to help detect failures.

  • Moore's Law (integrated circuit resources would double every year now doubles every two years) is no longer accurate due to the slowing of exponential growth.

1.3 Below Your Program

  • Applications consist of millions of lines of code and rely on sophisticated software libraries.

  • Hardware executes simple, low-level instructions.

  • Several layers of software translate high-level operations into computer instructions.

  • Systems software provides services, including operating systems, compilers, loaders, and assemblers.

  • An operating system interfaces between a user's program and the hardware, providing services and supervisory functions such as:

    • Handling basic input and output operations.

    • Allocating storage and memory.

    • Providing protected sharing among multiple applications.

  • Examples of operating systems: Linux, iOS, Android, and Windows.

  • A compiler translates programs written in high-level languages (C, C++, Java, Visual Basic) into hardware-executable instructions.

From a High-Level Language to the Language of Hardware

  • Computers understand on and off signals represented by 0 and 1 (binary numbers).

  • Commands are called instructions, represented as collections of bits.

  • Programmers initially communicated in binary, but symbolic notations were quickly invented.

  • Assembler: Translates a symbolic version of an instruction into binary.

    • Assembly Language: Symbolic representation of machine instructions.

    • Machine Language: Binary representation of machine instructions.

  • High-level programming languages and compilers translate more powerful languages into computer instructions.

Language Benefits

  • Natural language thinking using English words and algebraic notation.

  • Improved programmer productivity -- programs are written in languages that require fewer lines to express an idea.

  • Program independence from the computer on which they were developed.

1.4 Under the Covers

  • Underlying hardware performs functions such as inputting, outputting, processing, and storing data

  • Important Point: The five components of a computer perform these tasks:

Five Classic Components:
  • Input:

    • Devices such as keyboards and mice feed the computer.

  • Output:

    • Devices such as speakers convey the computation results to the user.

  • Memory:

    • Data.

  • Datapath & Control (Processor):

    • Processing of data.
      *Organization of a computer is independent of hardware technology. (Includes above components combined).

Looking Glass (Graphics):
  • Liquid Crystal Displays (LCDs) are low-power displays that control light transmission.

  • Active matrix displays utilize a tiny transistor switch at each pixel for precise current control.

  • Images are made a matrix of pixels represented as a bit map.

  • Hardware support for graphics includes a raster refresh buffer or frame buffer to store the bit map.

  • Touchscreen

    • Replace keyboard and mouse with touch-sensitive displays

    • Capacitive sensing detects distortion of the electrostatic field when touched.

Opening the Box:
  • I/O components (display, camera, microphone, etc.) dominate modern personal mobile devices.

  • Integrated circuits (chips) drive technology.

  • The processor (CPU) is the active part of the computer, following program instructions.

  • Datapath performs arithmetic operations.

  • Control tells the datapath, memory, and I/O devices what to do.

  • Memory is where programs are kept when running.

*DRAM (dynamic random access memory) provides random access to any location.

Descending Deeper:
  • Cache memory acts as a buffer for DRAM, using faster SRAM (static random access memory).

Abstractions is key:
  • instruction set architecture or simply architecture is a computer instruction vocabulary.

Application Binary Interface:
  • The ABI refers to any operating system interface that may be used to provide application programers with a basic instruction set

  • implementation is hardware that obeys the architecture abstraction. 04/21/25 21:22 1889313

Two Keys between hardware and software:
  • Key interface between the levels of abstraction.

  • This abstract interface enables many implementations of varying cost and performance to run identical software.

Volatile Memory vs Nonvolatile Memory:
  • Volatile memory (e.g. DRAM) loses data when power is off which cannot retain data when powered off.

  • Nonvolatile memory (e.g. DVD) retains data even without power.

Computer Communications:
  • A computer network allow the connected computer users to perform Communication, Resource sharing, and nonlocal access between computers.

  • Networks vary in performance and length Ethernet may be used.

  • Local area networks are interconnected with switches, providing security and routing. (km range)

  • Wide area networks cross continents. (100s of km range)

1.5 Technologies for Building Processors and Memory

  • Processors and memory have improved rapidly using the best technologies.

  • Transistor: An on/off switch controlled by an electric signal.

  • Integrated Circuit (IC):

    • Combined transistors into a single chip.

    • VLSI: Very Large-Scale Integration.

  • This rate of increasing integration has been remarkably stable. The figure below shows the growth in DRAM capacity since 1977

  • With the slowing of Moore's Law, quadrupling capacity has taken 6 years recently.

Manufacturing Process Information

  • Chips are manufactured using silicon, a semiconductor.

    • Silicon added with chemicals transforms into conductors, insulators, or switches.

  • Silicon crystal ingot is sliced into wafers, and chemicals are patterned on each wafer to make transistors, conductors, and insulators.

  • Defect: Microscopic flaw in wafer/patterning steps causing die failure.

  • Die (or chip): Individual rectangular sections cut from the wafer.

  • Yield: Percentage of good dies from total dies on the wafer.

  • 7-nanometer (nm) process smallest feature size on a die in nm.

  • After fabrication the device is connected to the input/output pins of a package, using a process called bonding. These packaged parts are tested a final time.

  • IC cost is calculated using these equations; Cost per die , with components used to measure and divide the wafer for use.

1.6 Performance

  • Selecting computers are based on their performance.

  • Accurate/comparative measures are critically chosen.

Airplane Analogy: Various Measures of Performance
  • Speed - The fastest plane carries a single passenger from point to another in the least possible amount of time.

  • Capacity - The Airbus A380-800 can transport 500 passengers from one point to another, clearly making it the fastest

Computer Performance:
  • Execution time - The running program on Computer for job done first. A faster Computer is most desired.

  • Response Time: (AKA execution time) The time to complete a task.

  • Throughput: (AKA bandwidth) Amount of work done in a given time. (Datacenter managers aim to increase through put)

*To maximize performance, minimize response time/execution time for the task.
Performance=1/Execution time\text{Performance} = 1 / \text{Execution time}

Comparing Computer Performance:

Performance<em>XPerformance</em>Y=n\frac{{\text{Performance}<em>X}}{{\text{Performance}</em>Y}} = n
*X faster than Y, where n is any number
*If n is positive execution time on Y is N times longer than on X:
Performance<em>XPerformance</em>Y=Execution time<em>YExecution time</em>X=n\frac{{\text{Performance}<em>X}}{{\text{Performance}</em>Y}} = \frac{{\text{Execution time}<em>Y}}{{\text{Execution time}</em>X}} = n

Measurements, Timings, and Performance metrics

  • The most straightforward definition of time is called wall clock time, response time, or elapsed time which include nearly everything such as input/output actions.

  • Computers are often shared. processors often work on multiple programs at once. System may try to optimize throughput to the detriment of per program.

  • CPU Execution Time is the time the CPU is actively computing a task. does not include I/O or other programs.

The following timings help specify performance equation with additional reference to instruction needed for the program.

  • CPU clock cycles: Number of cycles = Instructions for a program.

  • Clock cycle time: Amount of time per process or program

  • Clock cycles per instruction: abbreviated CPI. The average number of clock cycles each instruction takes to execute, is often used as a comparison to two different implemention.
    Clock rate vs CPU performance

  • Computer designers may want to think about a computer using a measure that relates to how fast the hardware can perform basic functions.

  • These discrete time intervals are called clock cycles (or ticks, clock ticks, clock periods, clocks, cycles) These are used by Computer designers with clock cycle time.

Relationship between timings:

CPU execution time: for a program
= CPU clock cycles for a program × Clock cycle time

Alternatively, because clock rate and clock cycle time are inverses,

CPU execution time = CPU clock cycles for a program/Clock rate

Key aspects to performance equations

  • CPUs relationship to time.

    • If clock cycles are high and length of the clock rate is cut this will allow for more cycles to occur.

  • Instruction sets which each program requires.

  • The compiler which creates machine language sets and the computer it is being executed on. The final affect of the instruction all have a direct correlation in code, that the higher it is the longer the run time.

  • Basic Performance Equation:* CPU time = Instruction count* CPL X Clock cycle time. or, since the clock rate is the inverse of clock cycle time: instruction count * CPI / clock rate

  • A measure of the dynamic frequency of instructions across one or many programs is the instruction mix which is compared to similar instructions of type. This shows the ability each calculation possesses to obtain the final product of exaction.

Main takeaways between each equation: we can conclude how important it is to check how these factor into computer performance when comparing different computers to others.

1.7 The Power Wall

  • With Power limitations the resources which are being cool on the current commodity microprocessors.

  • For CMOS(complementary metal oxide semiconductor - dominant chip tech) dynamic is used when energy is consumed with transistors switching states.

  • The dynamic energy depends on the capacitive loading of each transistor and the voltage applied (Energy Capacitive load Voltage .^2. )

*The power required per transistor is just the product of energy of a transition and the frequency of transition Power Capacitive load Voltage Frequency switched