Computer Abstractions and Performance

See how a computer system is built in layers, from applications and the operating system through the instruction set down to logic gates and transistors, and how a line of code becomes machine instructions. Then learn to measure performance properly: execution time and throughput, CPU time, clock rate and cycles per instruction, combined in the performance equation. Use Amdahl's law to predict what an improvement or extra processor cores can really gain, and see why power limits ended the race for faster clocks and made processors multicore.

IntermediateLesson 1 of 6 in Computer Organization and Architecture Course

What you will learn

  1. Explain how layers of abstraction connect an application to the transistors that run it, follow a statement from high-level code to machine instructions, and identify the instruction set architecture as the contract between software and hardware.
    • Trace the layers of abstraction from applications to transistors
      Name the layers of a computer system, say what each one provides and hides, and explain why abstraction makes complex systems possible to design.
    • Follow a program from high-level code to machine instructions
      Describe how compilers, assemblers, linkers and loaders turn a high-level program into binary machine instructions, and work through one statement down to its bit pattern.
    • Explain the instruction set architecture as the hardware/software interface
      Distinguish the ISA, the application binary interface and the implementation, and explain why one ISA can have many implementations with different performance.
  2. Use execution time and throughput to define performance, compare two computers correctly, and measure the times that matter for a program.
    • Compare computers using response time and throughput
      Define response time and throughput, express performance as the inverse of execution time, and state correctly how many times faster one computer is than another.
    • Measure elapsed time, CPU time and clock cycles
      Separate elapsed time from CPU time, interpret timing measurements, and convert between clock period and clock rate with the right units.
  3. Relate CPU time to instruction count, cycles per instruction and clock rate, calculate any one of them from the others, and judge which design choices and performance claims really change execution time.
    • Relate CPU time to clock cycles and clock rate
      Calculate CPU time from clock cycles and clock rate, and solve design problems where a faster clock costs extra cycles.
    • Calculate CPI from an instruction mix
      Define cycles per instruction, compute the average CPI as a weighted mean over instruction classes, and use it to compare code sequences.
    • Apply the classic performance equation
      Use CPU time = instruction count × CPI × clock cycle time to calculate and compare execution times, and identify which factors the algorithm, language, compiler, ISA, organization and technology change.
    • Judge performance claims and benchmark summaries
      Explain why MIPS and clock rate mislead, how benchmark suites such as SPEC CPU report results as ratios, and why the geometric mean is used to summarize them.
  4. Calculate the overall speedup when only part of a program gets faster, find the limit of that speedup, and apply the same reasoning to programs running on many processor cores.
    • Calculate the overall speedup from an enhancement
      Apply Amdahl's law to a partial improvement, find the improvement needed for a target speedup, and recognize when a target is impossible.
    • Use Amdahl's law to reason about multicore speedup
      Calculate the speedup and efficiency of a partly parallel program on many cores, explain why real speedups are lower, and contrast fixed-size with growing-size problems.
  5. Calculate how voltage, frequency and capacitance set a chip's power and energy, explain why rising power ended the era of ever-faster single cores, and explain why processors became multicore and what that asks of software.
    • Calculate dynamic power and energy in CMOS chips
      Use the relationships between capacitance, voltage, frequency, power and energy to estimate the effect of design changes, and distinguish dynamic from static power.
    • Explain the power wall and the end of Dennard scaling
      Describe how shrinking transistors once delivered faster clocks at constant power density, and why leakage and the voltage limit stopped clock rates from rising after the mid-2000s.
    • Explain why processors became multicore and what that asks of software
      Show with the power equation why several slower cores can beat one fast core, and explain why gaining speed from multicore processors depends on parallel software.

Computer Performance study guide

5 chapters

1

Connect software to hardware

A line of source code crosses several interfaces before a processor can carry it out. Applications rely on systems software, machine instructions rely on an ISA, and hardware designers implement those instructions with logic and transistors. Following that path makes it possible to separate a program’s required behavior from the design choices that determine its speed, and to see why compatible processors can perform very differently.

1.1 From applications to physical switches

An abstraction shows what a component does while hiding the details of how it works. A browser can ask the operating system to read a file without controlling the storage device’s circuits. Defined interfaces let people design, test, and replace parts of a system without rebuilding every layer at once.

The layers and their jobs

A common ordering, from the user’s task down to physical devices, is:

  1. Application software performs tasks such as editing a spreadsheet or browsing the web.
  2. Systems software supplies shared services and translates programs. It includes operating systems, compilers, assemblers, linkers, and libraries.
  3. The instruction set architecture (ISA) defines the machine instructions and other behavior visible to low-level software.
  4. The microarchitecture, or organization, implements that ISA with a datapath, control, pipelines, and caches.
  5. Digital logic builds operations and storage from gates, adders, multiplexers, and registers.
  6. Circuits connect electronic components to realize that logic.
  7. Devices, chiefly transistors, provide the physical switching behavior.

These boundaries are useful views of one machine. Different diagrams may group neighboring layers together. An operating system is software: the CPU executes its instructions, including privileged instructions that help it manage resources safely.

Follow one addition

Consider the C statement total = price + tax;. A compiler chooses where values live and which instructions perform the addition. It can choose an add instruction without designing an adder. A microarchitect maps that instruction onto execution hardware. A logic designer builds the adder from gates; a circuit designer deals with the electrical details behind those gates. Each person uses a simpler interface to the level below.

The physical computer has five classic components: input, output, memory, datapath, and control. The datapath operates on data. Control directs operations and coordinates memory and I/O. Together, datapath and control form the processor, or CPU.

StorageMain roleKeeps data without power?
DRAMMain working memoryNo
SRAMSmall, fast caches near the processorNo
Flash or magnetic diskSecondary storageYes

A transistor acts as an electrically controlled switch. An integrated circuit, or chip, joins many transistors on one piece of silicon. Those switches support logic; the logic supports instructions; instructions support software.

More transistors and different speeds

Moore’s law began with Gordon Moore’s 1965 observation and was revised in 1975 to a trend of roughly doubling transistor counts every two years. Ten such doublings multiply a count by 210=1024, over about 20 years. This is a manufacturing trend, not a physical guarantee; its pace has slowed.

Meeting an interface preserves the behavior promised by that interface. It does not fix performance, energy use, or cost. Two processors can implement the same addition instruction correctly while using different circuits, caches, and clock rates. The application gets the same computed result, yet waits a different amount of time.

Key Takeaways

  • An abstraction exposes useful behavior and hides implementation details.
  • The layers connect applications, systems software, the ISA, microarchitecture, logic, circuits, and devices.
  • The CPU combines datapath and control; memory and I/O complete the classic five-component view.
  • DRAM and SRAM are volatile; flash and magnetic disks retain data without power.
  • Moore’s law describes a transistor-count trend, not guaranteed performance growth.
  • Compatible interfaces preserve specified behavior, while speed and energy still depend on lower layers.

1.2 How source code becomes instructions

A processor executes machine language, instructions encoded as bits. High-level code describes a computation in variables, expressions, loops, and functions. Translation bridges those two views, often expanding a short statement into several instructions.

The compiled-program path

For a C program, the main stages are:

StageInput and result
CompilerTranslates source code into assembly or directly into object code
AssemblerTurns symbolic assembly into machine code in an object file
LinkerCombines object files and library code, resolving references between them
LoaderMaps the executable into memory and starts the program

An object file can contain machine code without yet being a complete runnable program. For example, a call to a function defined in another file needs the linker to resolve that reference. The loader is part of the operating system’s execution support, not another source-code translator.

Trace one C statement

Suppose price is in register x6, tax is in x7, and the compiler places total in x5. Then:

total = price + tax;

can become this RISC-V instruction:

add x5, x6, x7

The destination comes first in the assembly text. The instruction adds the values in x6 and x7 and writes the result to x5. Its 32-bit R-type encoding places the fields in a different order:

FieldMeaning hereBits
funct7Selects the add operation with the other operation fields0000000
rs2Source register 700111
rs1Source register 600110
funct3Operation selector000
rdDestination register 500101
opcodeInstruction family0110011

Joining the fields gives 0000000 00111 00110 000 00101 0110011, or 0x007302B3. The spaces make the fields readable; they are not stored as part of the instruction.

One source statement need not mean one instruction. Even with all operands in registers, f = (g + h) - (i + j); needs two additions and a subtraction. Loading operands from memory adds instructions. Executed instruction count therefore depends on translation and the ISA, not just the number of source lines.

Other routes to machine code

A high-level program can often be recompiled for another ISA. Its existing executable is tied to its ISA and operating-system conventions. An x86-64 executable needs recompilation, emulation, or binary translation to run on an Arm or RISC-V machine that cannot execute it natively.

Bytecode is an intermediate instruction format for a language runtime. CPython compiles Python source to bytecode and interprets it with an interpreter program. Java virtual machines commonly use just-in-time (JIT) compilation to turn frequently used bytecode into machine code while the program runs. In both cases, the physical CPU ultimately executes machine instructions.

Assembly remains text, even when a line resembles a real instruction closely. A pseudo-instruction is a convenience accepted by the assembler: RISC-V mv x5, x6 becomes addi x5, x6, 0. Exact instruction control can be useful in operating-system code and critical loops, but it gives up some of the portability and compiler freedom of high-level code.

Key Takeaways

  • Compilation, assembly, linking, and loading perform different jobs.
  • Assembly is symbolic text; machine code is the binary encoding the processor executes.
  • One high-level statement can execute several instructions, including memory operations.
  • Interpreters and JIT compilers still rely on machine instructions at the hardware level.
  • A source program can be recompiled for another ISA; its existing executable is not generally portable.

1.3 The ISA, the ABI, and the processor design

The instruction set architecture (ISA) is the contract between hardware and the lowest-level software. It tells a machine-language programmer what operations exist and what those operations mean. A processor’s internal design can change while that contract remains stable.

What the contract specifies

An ISA defines instructions and their binary encodings, programmer-visible registers, addressing behavior, supported data types, and the architectural mechanisms used to reach I/O. A compiler targets these features when it turns a computation into instructions.

An implementation is a physical design that obeys the ISA. Its microarchitecture describes internal choices such as execution units, pipeline stages, cache sizes, and branch prediction. Those choices strongly affect execution time.

QuestionKind of choice
Does a multiply instruction exist, and what result does it produce?ISA
Does that multiply take one cycle or four?Microarchitecture
Which registers carry function arguments?ABI convention
How large is the first-level cache?Microarchitecture

The distinction is about the promised behavior. A program must receive the specified multiplication result. It usually does not need to know how the multiplier was built to obtain that result.

Why an ISA alone is not enough for binary compatibility

The application binary interface (ABI) adds the operating-system interface and binary conventions to the user-level ISA. It specifies calling conventions, such as argument registers, along with data layout and system-call conventions. Two machines can execute the same instruction encodings yet disagree about how a function receives an argument.

Binary compatibility requires the program’s ISA features and ABI to be supported. Even within the x86 family, which began with Intel’s 8086 in 1978, operating-system support and execution modes matter. Backward compatibility has preserved many older programs while processor implementations have changed, but sharing a family name is not a guarantee that every historical executable runs in every environment.

One architecture, many implementations

Intel and AMD implement x86-64 with different internal designs. Arm and RISC-V likewise support implementations with very different power budgets and performance. RISC-V began at the University of California, Berkeley, in 2010 and is an open, royalty-free ISA. Its base integer sets include RV32I and RV64I; standard extensions include M for integer multiplication and division, and F and D for floating-point operations.

A program using an optional extension needs an implementation that supports it. The existence of a shared base does not make every extension universal. The RISC-V addition example illustrates the same hardware/software boundary found in Arm and x86, although their instructions and encodings differ.

Instruction richness and execution time

An ISA can express more work in one instruction, reducing instruction count. That instruction may also take more cycles or demand a longer cycle. The relevant calculation is the whole product:

CPU time=instruction count×CPI×cycle time.

A richer instruction set is not enough to establish which machine is faster. Nor does a shared ISA establish equal speed: compatible processors can use different clocks, caches, and execution units to produce the same required results.

Key Takeaways

  • The ISA specifies programmer-visible machine behavior; microarchitecture implements it.
  • The ABI adds binary conventions and the operating-system interface needed by executables.
  • Binary compatibility requires the relevant ISA features, execution environment, and ABI.
  • RISC-V combines a base integer ISA with optional standard extensions.
  • Instruction richness changes tradeoffs among instruction count, CPI, and cycle time.
2

Measure the performance that matters

Performance starts with the work someone needs completed: one task, a stream of requests, or a mix of both. The right timing measure depends on that need. Separate the time a user waits from the time a processor computes, then translate between clock frequency and cycle length. These distinctions keep a fast processor, a high-capacity server, and a responsive application from becoming three different claims hidden behind the same word.

2.1 Time for one task and work per second

A person waiting for a file conversion wants a short response time. A service processing many conversions also needs high throughput. These measures answer different questions, even when both describe the same computer.

Choose the quantity that matches the task

Response time, also called execution time or latency, runs from the task’s start to its completion. It includes computing, memory and storage accesses, I/O, and relevant operating-system activity. If the task waits in a queue after submission, that wait contributes to the user’s response time.

Throughput is completed work per unit of time. Its units might be requests per second or jobs per hour. A machine can complete many jobs per hour while each individual job still takes a long time.

NeedUseful measureImprovement
Finish one interactive requestResponse timeFewer seconds per request
Process a large independent workloadThroughputMore requests per second
Serve many people acceptablyBothMore completed work with acceptable waits

Adding processors can raise throughput by running independent tasks at once. It need not shorten a task’s own computation, although it can reduce time spent waiting for a free processor. A faster processor often helps both measures.

Compare performance in the right direction

For the same task, define:

PerformanceX=1TX.

If A takes 10 s and B takes 15 s, A’s performance relative to B is:

PerformanceAPerformanceB=TBTA=1510=1.5.

A is 1.5 times as fast. B’s performance is two thirds of A’s. Put the larger execution time over the smaller one when reporting how many times as fast the faster machine is.

For an improvement, speedup is old time divided by new time. A build falling from 60 s to 48 s has speedup:

6048=1.25.

Its time reduction is:

60−4860=0.20=20%.

The performance rose by 25%, while time fell by 20%. These percentages use different denominators. Saying “20% faster” can obscure which quantity changed; the ratio and the measured times make the claim clear.

Equal throughput can hide unequal waits

A service completing 1,200 requests per minute delivers 20 requests per second. That rate could come from processing one request every 50 ms, with each request taking 50 ms. It could also come from processing ten requests in parallel, each taking 500 ms: ten completions every half second again gives 20 per second.

The second arrangement has the same throughput but ten times the per-request processing time. A throughput result alone cannot establish the latency a user experiences. Compare the same completed work, state the time interval, and retain the units when moving between minutes and seconds.

Key Takeaways

  • Response time measures how long one task takes; throughput measures completed work per unit of time.
  • For the same task, performance is the inverse of execution time.
  • Speedup is old time divided by new time; percentage time reduction uses the old time as its denominator.
  • Extra processors can raise throughput without shortening a sequential task’s computation.
  • Equal throughput can coexist with very different request latencies.

2.2 Read timing results and convert clock units

A stopwatch measures everything between start and finish. The CPU performance equation measures processor work. Keeping those views separate prevents a processor upgrade from receiving credit for waiting time it cannot remove.

Elapsed time and processor time

Elapsed time, or wall-clock time, includes computing, waiting for files or the network, and intervals when other processes run. CPU time records processor time charged to the task. User CPU time runs the program’s code; system CPU time runs operating-system code on its behalf.

Suppose the Unix time command reports “real 2.50 s, user 1.80 s, sys 0.20 s.” The program used:

1.80+0.20=2.00 s

of CPU time. For this single-threaded timing example, the remaining 0.50 s represents time not charged as CPU execution, such as waiting or being scheduled out. If a processor improvement halves the CPU part while that waiting stays fixed, elapsed time becomes:

0.50+2.002=1.50 s.

Halving the full 2.50 s would incorrectly speed up the waiting too. CPU performance often focuses on user time; system performance is judged using elapsed time under controlled system load.

For a parallel program, CPU time is summed across its threads and cores. Four cores working for most of one second can produce 3.6 s of user time during 1.0 s of elapsed time. In that case, subtracting summed CPU time from elapsed time does not measure waiting.

Clock rate is the reciprocal of period

A clock gives synchronous hardware a timing rhythm. The clock period is seconds per cycle; the clock rate is cycles per second:

period=1rate.

At 4 GHz, the rate is four billion cycles per second. One cycle lasts:

14×109 s=0.25 ns=250 ps.

At 2.5 GHz the period is 400 ps. In the opposite direction, 312.5 ps per cycle gives:

1312.5×10−12 Hz=3.2 GHz.
Prefix or unitValue
GHz109 cycles/s
ns10−9 s
ps10−12 s
KiB210=1024 bytes
GiB230=1,073,741,824 bytes

Time and frequency prefixes use decimal powers. Binary memory prefixes use powers of two. Labels such as “GB” are sometimes used loosely for binary quantities, so inspect the meaning before converting a size.

Interpret a measurement as a run

A processor’s advertised frequency is not a record of every moment of execution. Boosting, power management, and thermal throttling change frequency. Cache contents and background activity also change measured time. Repeating a measurement and reporting a typical value, such as the median, helps distinguish a stable result from an unusually favorable run. Use timing and frequency measurements from the same execution interval when connecting them to cycle counts.

Key Takeaways

  • Elapsed time includes waiting; CPU time includes user time plus system time charged to the task.
  • CPU time summed across several cores can exceed elapsed time.
  • Clock period and clock rate are reciprocals; keep seconds, nanoseconds, and picoseconds consistent.
  • GHz uses decimal powers of ten; KiB and GiB use binary powers of two.
  • Boost, throttling, caches, and background work can change the result from run to run.
  • A CPU speedup reduces the CPU portion of elapsed time, leaving unaffected waits in place.
3

Calculate and compare CPU time

A program’s CPU time comes from how many instructions it executes, how many cycles those instructions require, and how long each cycle lasts. These factors can move in opposite directions when a compiler or processor changes. Work through cycle budgets and instruction mixes before comparing complete execution times, then use those same relationships to judge clock-rate claims, instruction-rate claims, and benchmark summaries.

3.1 Turn a cycle budget into CPU time

A clock cycle is a unit of processor time, not an instruction. Some instructions need many cycles, and overlapping execution can complete several instructions per cycle. Begin with the total cycles needed by the whole program.

Divide cycles by cycles per second

If a program needs a known number of cycles, its CPU time is:

T=cycles×period=cyclesclock rate.

For six billion cycles at 3 GHz:

T=6×1093×109=2 s.

The units explain the division: cycles divided by cycles per second leaves seconds. Multiplying cycles by frequency would produce cycles squared per second, not a duration. Multiplying by the period works because its unit is seconds per cycle.

The same equation can find another unknown. Multiply time by frequency to recover cycles; divide cycles by the target time to find the needed frequency. Keep the frequency in Hz when the time is in seconds, or cancel matching billion-scale factors explicitly.

When a faster clock requires more cycles

Processor A runs a program in 10 s at 3 GHz. Its cycle budget is:

10×3×109=3×1010 cycles.

A proposed design B increases that cycle count by 20%. B must therefore execute:

1.2×3×1010=3.6×1010 cycles.

To finish in 9 s, B needs:

fB=3.6×10109=4×109 Hz=4 GHz.

The clock-rate ratio is four thirds, about 1.33. The actual speedup is only ten ninths, about 1.11, because B needs more ticks to finish the work. Treating the old cycle count as unchanged would predict a clock rate too low to reach the target.

Compare a tradeoff without choosing a program size

Let a design multiply the old cycle count by a factor a and the old clock rate by a factor b. Then:

TnewTold=ab.

The design is faster when the cycle-count growth factor is smaller than the frequency growth factor. If both grow by the same factor, CPU time is unchanged. This ratio is useful when a design proposal reports percentage changes but gives no absolute cycle count.

Why the period has a physical limit

Between registers, signals travel through combinational logic and must settle before their results are captured. The slowest required path is the critical path. Circuit technology and the amount of work assigned to a stage limit how short a safe clock period can be.

A designer can divide work into shorter pipeline stages to allow a faster clock, but the reorganization can also change cycle count. More GHz is therefore a statement about tick frequency. To establish a performance improvement, pair it with the cycles the program actually needs under that design.

Key Takeaways

  • CPU time equals cycles times cycle period, or cycles divided by clock rate.
  • Time times clock rate recovers cycles; cycles divided by target time gives the required clock rate.
  • Compare the cycle-count factor with the frequency factor when both change.
  • The critical path limits the clock period, and reorganizing the work can change the cycle count.

3.2 Weight CPI by the instructions that run

Cycles per instruction (CPI) is the program’s total CPU cycles divided by its executed instruction count. It is an average over a run, so it can be fractional and depends on which instructions execute and how they interact with the machine.

Add the cycles before taking the average

For instruction classes with counts Ci and class CPIs ci:

cycles=∑iCici,CPI=∑iCici∑iCi.

Equivalently, multiply each class CPI by its fraction of the instruction count and add the contributions. The fractions must describe executed instructions, not source lines or the number of instruction types.

Suppose ALU instructions take 1 cycle, loads/stores take 4, and branches take 2. A mix of 50%, 30%, and 20% gives:

0.50(1)+0.30(4)+0.20(2)=0.50+1.20+0.40=2.1.

For five billion instructions at 3 GHz, total cycles are 10.5 billion and CPU time is 3.5 s. The unweighted mean of the three class costs, about 2.33, is wrong: the classes do not appear equally often.

More instructions can still mean fewer cycles

Two compiler versions use the same class costs:

ClassCycles eachVersion 1, millionsVersion 2, millions
ALU1400600
Load/store4300150
Branch2100100

Version 1 executes 800 million instructions. Its cycle contributions are 400, 1,200, and 200 million, totaling 1,800 million. Its CPI is:

1800800=2.25.

Version 2 executes 850 million instructions. Its contributions are 600, 600, and 200 million, totaling 1,400 million. Its CPI is:

1400850≈1.65.

At 3 GHz, the times are 0.60 s and about 0.467 s. Version 2 is about 1.29 times as fast despite executing 50 million more instructions. Replacing many expensive memory instructions with more cheap ALU instructions can make that trade worthwhile.

CPI belongs to a workload on a machine

Memory stalls, cache misses, branch behavior, and compiler choices change effective CPI. A single “processor CPI” cannot describe every program. Hardware performance counters or a simulator can measure instruction and cycle totals for the workload being analyzed.

Instructions per cycle (IPC) uses the same totals in the opposite order:

IPC=1CPI.

An IPC of 2.5 gives CPI 0.4. Multiple instructions can overlap in a processor that issues and completes several instructions per cycle. An average below one does not mean an individual instruction’s full journey finishes in a fraction of a clock tick.

Key Takeaways

  • Compute total cycles by summing each class count times its CPI.
  • Average CPI weights class costs by executed instruction fractions.
  • A longer instruction sequence can run faster if its total cycle count is smaller.
  • CPI depends on the program, compiler, and machine behavior during the run.
  • IPC is the reciprocal of CPI; overlapping execution can produce CPI below one.

3.3 Combine instruction count, CPI, and clock rate

The CPU performance equation brings the three timing factors together:

T=I×CPI×tcycle=I×CPIf.

Here I counts executed instructions and f is the clock rate in effect during execution. Instructions times cycles per instruction gives cycles. Dividing by cycles per second then gives seconds.

Calculate a time and recover an unknown

A program executes two billion instructions at CPI 1.5 on a 2.5 GHz processor. First find the cycle total, then convert it to time:

2×109×1.5=3×109 cycles, T=3×1092.5×109=1.2 s.

To infer CPI from measured time, rearrange the same equation:

CPI=TfI.

For 1.6 billion instructions in 0.8 s at 3.2 GHz, there are 2.56 billion cycles. Dividing by 1.6 billion instructions gives CPI 1.6.

Compare complete products

Two processors run the same compiled program with the same instruction count. A has 4 GHz and CPI 1.8; B has 2.5 GHz and CPI 1.0. Their time per instruction is:

1.84×109=0.45 ns,1.02.5×109=0.40 ns.

B is 1.125 times as fast. Its lower CPI more than offsets its slower clock. Instruction count cancels here because it is equal; it would not cancel if the two programs followed different instruction sequences.

Likewise, a compiler option that cuts instruction count by 10% but raises CPI by 15%, at the same frequency, changes time by:

0.90×1.15=1.035.

Time rises by 3.5%. The instruction reduction alone points in the wrong direction.

Connect design choices to the factors
ChoiceFactors it can change
AlgorithmInstruction count and possibly CPI
Programming language or compilerInstruction count and CPI
ISAInstruction count, CPI, and clock rate
OrganizationCPI and clock rate
Circuit technologyClock rate

The links are useful for analysis, not independent controls that can always be adjusted without consequences. A cache reduces memory-wait cycles, lowering effective CPI. Pipelining overlaps successive instructions and can lower effective CPI or allow a shorter clock period. Such changes may introduce other costs that appear in the measured totals.

Keep the measurement interval consistent

Measure CPU time, instruction count, cycles, and frequency for the same work. Counters or simulation provide instruction and cycle counts. A product’s rated GHz is not the frequency record for a run that boosts or throttles. When frequency varies, the matching average is total counted cycles divided by the CPU time for that interval.

The equation predicts CPU execution time. Waiting for storage or the network belongs in elapsed time and must be included separately when that is the result the user needs.

Key Takeaways

  • CPU time is instruction count times CPI divided by clock rate.
  • Rearrange the equation to infer CPI, instruction count, or required frequency from measured quantities.
  • Cancel instruction count only when the compared executions have the same count.
  • Compiler and hardware changes can improve one factor while worsening another.
  • Use the frequency and counts from the same run, not an advertised clock rate.
  • Add unaffected waits separately when predicting elapsed time.

3.4 Judge benchmark scores and instruction-rate claims

A useful performance claim concerns work that matters to the user. A benchmark runs a chosen workload to measure performance. A benchmark suite samples several workloads when one application cannot represent the whole need.

Read the kind of SPEC result

SPEC CPU 2026, released in May 2026, follows SPEC CPU 2017. Its suites exercise processors, memory systems, and compilers. SPECspeed measures completion time for one copy of a program; that copy can itself use multiple threads. SPECrate measures throughput using multiple copies. Integer and floating-point suites serve different workload types, and the product also supports energy metrics.

A single-program speed ratio compares reference time with measured time:

r=TreferenceTmeasured.

A reference time of 3,000 s and measured time of 250 s gives 12. Higher is better. A rate ratio includes the number of copies completed in the measured interval. Compare like metrics and the same suite version; a speed score and a rate score answer different questions.

Summarize ratios with a geometric mean

For positive ratios, the suite uses:

G=r1r2⋯rnn.

Ratios 2, 8, and 4 give a product of 64 and a cube root of 4. Their arithmetic mean is about 4.67, a different result.

The geometric-mean comparison does not depend on which reference machine sets the ratios. Suppose X takes 10 s and 40 s on two programs, while Y takes 20 s and 25 s. Reference times of 100 s for both give ratios 10 and 2.5 for X, and 5 and 4 for Y. The geometric means are 5 and about 4.47, so X leads by about 1.12.

Change the reference times to 50 s and 200 s: X gets ratios 5 and 5, Y gets 2.5 and 8. Their geometric means stay 5 and about 4.47. The arithmetic means instead change from 6.25 versus 4.5 to 5 versus 5.25, reversing the ranking. Reference normalization must not decide which machine appears faster.

Why MIPS can reward slower code

MIPS, million instructions per second, is:

MIPS=ITCPU×106=fCPI×106.

Instructions do different amounts of useful work across ISAs. Even on one machine, MIPS changes with the program, and a higher instruction rate can accompany a longer execution time.

At 3 GHz, let ALU, load/store, and branch instructions cost 1, 4, and 2 cycles. Code Q executes 400, 300, and 100 million of them: 800 million instructions, 1,800 million cycles, 0.60 s, about 1,333 MIPS. Code P executes 1,500, 100, and 100 million: 1,700 million instructions, 2,100 million cycles, 0.70 s, about 2,429 MIPS. P retires instructions faster but finishes the task later.

Peak rates describe ideal hardware capacity. Real workloads may reach much less because of dependencies, memory waits, and other limits. Use actual task time to judge task performance; frequency, MIPS, and peak rates explain only selected pieces of it.

Key Takeaways

  • Choose benchmarks that represent the intended workload.
  • SPECspeed measures one copy’s completion time; SPECrate measures throughput across copies.
  • A larger reference-time/measured-time ratio indicates better performance.
  • Use the geometric mean to summarize positive normalized ratios without reference-dependent rankings.
  • MIPS can rise while a task slows down, and instructions across ISAs do different amounts of work.
  • Peak rates describe ideal capacity, not a task’s measured execution time.
4

Find the limits of an improvement

An improvement matters only during the part of a task that can use it. A faster arithmetic unit leaves file waits alone, and extra cores leave serial work on one core. Amdahl’s law turns that split into a time budget, making both likely gains and hard limits visible. The same reasoning helps choose an optimization, work backward from a target, and explain why fixed-size and growing-size parallel workloads tell different stories.

4.1 Calculate the gain from improving part of a task

Amdahl’s law starts by dividing the original execution time into an affected part and an unaffected part. Speed up only the affected time, then add the pieces back together. This avoids applying a local improvement to work it cannot change.

Build the new time from old times

If the affected part becomes s times as fast:

Tnew=Taffecteds+Tunaffected.

Let f be the affected fraction of the original execution time. Dividing by the original time gives the speedup form:

S=1(1−f)+f/s.

A 120 s program spends 90 s on floating-point work and 30 s elsewhere. Thus the affected fraction is 0.75. Making floating point three times as fast reduces its time to 30 s:

Tnew=903+30=60 s,S=12060=2.

The floating-point work gains a factor of three; the complete program gains a factor of two. The unchanged 30 s explains the gap.

Work backward from a target

To finish the same task in 40 s, the unchanged work still needs 30 s. Only 10 s remain for the original 90 s floating-point part. Therefore:

40=90s+30,s=9010=9.

A target of 30 s would leave zero time for that work. No finite acceleration makes a positive amount of affected work take exactly zero time. As the local speedup grows without bound, the overall speedup approaches:

Slimit=11−f.

Here the limit is 4, approached from below. With an unaffected fraction of one half, the limit is 2. When all the work is affected, there is no unchanged positive time to impose such a finite ceiling.

Optimize where the time goes

The principle make the common case fast means identifying where execution time is actually spent. Profiling measures that distribution. Doubling a part responsible for 60% of time gives:

S=10.40+0.60/2≈1.43.

A tenfold improvement to a 10% part gives only:

S=10.90+0.10/10≈1.10.

A large local factor can lose to a modest improvement applied to more of the task.

The affected fraction must be a time fraction. If loads/stores are 30% of instructions but take 60% of the cycles, their time fraction at a fixed clock rate is 0.60. Counting instructions equally would miss their larger cost.

Apply the same split to waiting

For a task with 2.00 s of CPU work and 0.50 s of fixed file waiting, doubling CPU speed gives 1.50 s overall. Its speedup is about 1.67. The same time budget works for hardware, software, and I/O improvements: identify exactly which original time changes before applying the factor.

Key Takeaways

  • Amdahl’s law accelerates the affected time and leaves the unaffected time in the total.
  • The affected fraction is a fraction of original time, not instructions or source lines.
  • Use the target time minus unaffected time to find the required local improvement.
  • A positive unaffected fraction sets a speedup limit of one divided by that fraction.
  • Profiling helps identify improvements that affect a large share of execution time.

4.2 Estimate speedup and efficiency across cores

More cores shorten a task only when work can run at the same time. Divide a fixed task’s original single-core time into a serial part and a parallel part, then consider what additional cores can change.

Amdahl’s law for a fixed-size task

Let p be the parallel fraction of the original single-core time. With perfect division across N cores and no overhead:

S(N)=1(1−p)+p/N.

For a parallel fraction of 0.95, the serial fraction is 0.05. Eight cores give:

S(8)=10.05+0.95/8≈5.93.

At 100 cores the speedup is about 16.8; at 1,000 cores it is about 19.6. The serial 5% keeps the fixed-size speedup below 20 regardless of how many cores are added.

Parallel efficiency is speedup divided by core count. The eight-core efficiency is about 0.74, or 74%. At 100 cores it is about 17%. A larger speedup can come with lower efficiency because each additional core contributes less to the fixed task.

Why measured gains can be smaller

The ideal model gives the parallel work equal shares and no coordination cost. Real programs communicate and synchronize, and some cores receive more work than others.

For 100 equal units of independent work on four identical cores, a balanced assignment gives 25 units to each. If one receives 40 units while the rest finish earlier, completion waits for that busiest core. The speedup is 100 divided by 40, or 2.5, even before adding communication costs. Adding the other cores’ early finishing times together would not give the completion time: the last required result determines it.

A single-threaded program has no parallel fraction to distribute. More cores can still run other programs and improve system throughput, but they do not divide that program’s instruction stream automatically.

Fixed work and growing work ask different questions

Strong scaling holds total problem size fixed and asks how much faster more processors can finish it. Weak scaling grows total work in proportion to processor count so that work per processor stays about constant. A larger simulation can use a finer grid while retaining roughly the same workload per processor.

Gustafson’s law describes scaled work when serial time stays fixed while parallel work grows. Its serial fraction s is measured on the parallel run, unlike Amdahl’s original single-core fraction:

Sscaled=s+(1−s)N.

For a measured serial fraction of 0.05 on 100 cores, scaled speedup is 95.05. This does not contradict Amdahl’s limit of 20 for a fixed task whose original serial fraction was 5%. The task size and the fraction’s measurement basis differ.

Parallel software must expose independent work, balance it, and coordinate the results. More hardware provides capacity; the program’s structure determines how much of that capacity shortens its completion time.

Key Takeaways

  • For ideal fixed-size scaling, divide only the original parallel time by the core count.
  • The original serial fraction sets Amdahl’s multicore speedup limit.
  • Parallel efficiency is speedup divided by the number of cores.
  • Communication, synchronization, and uneven work distribution reduce gains.
  • Strong scaling fixes total work; weak scaling keeps work per processor approximately fixed.
  • Gustafson’s law uses a serial fraction measured on the parallel run for a growing workload.
5

Connect power limits to multicore design

A processor must finish work within both a time budget and a power budget. Switching transistors consumes energy, voltage strongly affects that cost, and heat limits how aggressively a chip can run. Connect those relationships to the end of ideal transistor scaling and the move toward multiple cores. The result explains why more transistors can still be useful even when faster clocks alone cannot deliver the next performance gain.

5.1 Calculate switching power and task energy

CMOS processors consume energy when signals switch and also through leakage while powered. Dynamic energy is associated with switching; static power is drawn even without useful switching. Their relative shares depend on the chip and its workload.

Voltage has a squared effect

The energy associated with a transition scales with capacitance and the square of supply voltage. A common expression uses one half of capacitance times voltage squared; a full charge-and-discharge pulse scales with capacitance times voltage squared. For average dynamic power, use:

Pdynamic=αCV2f.

Here C is capacitive load, V is supply voltage, f is clock frequency, and α describes switching activity under the chosen counting convention. Some conventions absorb a factor of one half into the activity factor. Ratio calculations work cleanly when the activity convention is kept consistent.

For unchanged capacitance and activity, lowering both voltage and frequency by 20% gives:

PnewPold=0.82×0.8=0.512.

The new dynamic power is 51.2% of the original. Lowering voltage alone by 10% gives a factor of 0.81, a 19% reduction in dynamic power and energy per transition.

Lower voltage also slows transistor switching. Dynamic voltage and frequency scaling (DVFS) adjusts voltage and frequency together so the circuitry can still operate at its chosen speed.

Power and energy answer different questions

Power is a rate, measured in watts; one watt is one joule per second. Energy for a task is average power multiplied by duration:

E=PaverageT.
ExecutionAverage powerTimeEnergy
A20 W3 s60 J
B30 W1.5 s45 J

B draws more power while running but uses less energy to complete the task. Cooling must handle the rate of heat production; battery use and electricity consumption accumulate energy over time.

For fixed work with the same transition count, voltage, and activity, lowering frequency alone spreads those transitions over more time. Dynamic power falls, but dynamic task energy is unchanged. Lowering voltage reduces the energy of each transition as well. If static power persists throughout the longer run, slowing down can even increase that part of task energy.

Leakage and idle hardware

Nominally off transistors still pass leakage current. Smaller devices and lower threshold voltages make leakage an important design issue. Power gating disconnects the supply to an idle region to reduce its static draw.

A lightly loaded server can still use a substantial fraction of its peak power. Making consumption follow useful work, called energy proportionality, is a design goal. Finishing a task quickly and entering a low-power state can save energy by shortening the interval over which leakage and other background power are paid. Performance and energy efficiency can therefore improve together.

Key Takeaways

  • Dynamic power scales with switching activity, capacitance, voltage squared, and frequency.
  • Voltage reduction lowers energy per transition and usually requires a frequency adjustment.
  • Task energy is average power times duration; a higher-power run can use less energy.
  • Lowering frequency alone leaves fixed-transition dynamic task energy unchanged.
  • Leakage causes static power, and power gating reduces draw in idle regions.
  • Low utilization does not guarantee low power; energy proportionality is a design goal.

5.2 Why faster clocks met a power limit

For decades, smaller transistors brought both more devices and faster switching within a manageable heat budget. The power wall appeared when voltage could no longer keep falling enough to support that pattern. It changed the way designers turned new transistors into useful performance.

The ideal Dennard scaling relationship

In the ideal scaling model developed by Robert Dennard and colleagues in 1974, let a factor k>1 describe the shrink. Dimensions, capacitance, voltage, and delay are divided by that factor. Frequency can multiply by the factor. Dynamic power per transistor therefore changes by:

1k×1k2×k=1k2.

Area per transistor also falls by the square of the shrink factor. The same area can hold that many more transistors, offsetting the lower power per device. Power density, watts per unit area, remains approximately constant in this ideal model.

For a factor of 1.4, capacitance and voltage fall to about 0.71 of their original values and frequency rises by 1.4. Power per transistor falls to about 0.51. About 1.96 times as many transistors fit, so total power in the same area stays roughly unchanged.

Why voltage stopped tracking size

Transistors need a usable switching threshold. Reducing threshold voltage too far sharply increases leakage. By the mid-2000s, supply voltage could no longer shrink in step with transistor dimensions. At nearly fixed voltage, a higher frequency raises dynamic power, and packing more active transistors into an area raises the heat that must be removed.

The historical figures show the scale of the earlier change: desktop clocks rose from around 10 MHz in the early 1980s to 3.8 GHz in 2004, while supply voltages fell from roughly 5 V toward 1 V. Those are broad historical values, not universal specifications. Around 100 W was already a difficult cooling budget for many mainstream designs of that period.

Intel’s 2004 cancellation of the planned 4 GHz Pentium 4 and Tejas design marked that turn toward power-conscious designs and dual cores. Clock rates subsequently remained on the scale of a few gigahertz instead of following the earlier rapid climb. Microarchitecture continued to improve single-core performance, but frequency increases supplied much less of the gain.

Manage the thermal budget

Thermal design power (TDP) is a thermal-design target used to size a cooling solution under specified operating conditions. It is not an instantaneous power measurement or a universal maximum. When thermal limits are reached, throttling lowers operating speed to reduce heat.

If a chip contains more hardware than its power budget can run together at full speed, some regions must be slowed or switched off. Dark silicon names this gap between available transistors and simultaneously usable active hardware.

Moore’s law and Dennard scaling describe different trends: transistor counts versus power-aware scaling behavior. The breakdown of the latter did not mean transistor counts stopped growing. The obstacle to indefinitely raising frequency is chiefly power and heat, not a sudden inability of transistors to switch any faster.

Key Takeaways

  • Ideal Dennard scaling reduced voltage with device size and kept power density roughly constant.
  • Leakage and switching-threshold constraints prevented voltage from continuing to scale ideally.
  • Without matching voltage reductions, faster clocks and more active devices raise power density.
  • TDP guides cooling design under specified conditions; throttling reduces speed at thermal limits.
  • Dark silicon describes hardware that cannot all be active at full speed within the power budget.
  • Moore’s transistor-count trend is distinct from Dennard’s scaling relationship.

5.3 Use more cores within a power budget

A multicore processor places several cores on one chip. Each core runs an instruction stream, while cores share main memory and often some caches. Mainstream desktop and laptop designs moved toward dual cores around 2005–2006 as raising a single core’s clock became increasingly costly in power.

Compare two slower cores with one faster core

Consider one core at 4 GHz and 1.2 V versus two cores at 3 GHz and 1.0 V. Keep capacitance per core and switching activity the same for this comparison. Relative dynamic power is:

2×(1.01.2)2×34≈1.04.

With equal work per cycle and enough independent work for both cores, ideal throughput changes by:

2×34=1.5.

The pair offers about 50% more throughput for about 4% more dynamic power. The squared voltage reduction makes the extra core affordable in this model. Static power, shared memory limits, and coordination costs still matter when assessing a complete chip.

For a sequential program using only one new core, performance falls to three quarters of the original at equal work per cycle. It takes four thirds as long. Combining the two 3 GHz rates into “6 GHz” would conceal that outcome: neither core ticks at 6 GHz.

Software must expose the work

Before the power wall, higher frequency and hardware overlap often accelerated existing code without major changes. Extra cores need independent instruction streams. A program gains from them by dividing its work into concurrent tasks, balancing the assignments, and coordinating results. Parallel libraries can provide that structure, but the work still must have a useful parallel form.

Instruction-level parallelism overlaps instructions within a stream, using hardware and compiler techniques such as pipelining and multiple issue. Thread-level parallelism runs different threads across cores. These are different sources of concurrency: the first does not ensure that a program can occupy every core.

Independent server requests naturally provide many streams, so multicore can improve throughput even when each request remains sequential. Shortening one request’s computation needs parallelism inside that request. Its serial fraction then imposes the Amdahl limit.

Spend transistors on efficient kinds of work

More transistors can support larger caches, several general-purpose cores, or specialized hardware. GPUs and domain-specific accelerators target workloads such as graphics, machine learning, and video encoding. Chips can also mix fast, high-power cores with smaller, more efficient cores, as in Arm big.LITTLE designs.

Under a fixed power budget, performance per watt compares useful performance with power draw. SPEC CPU 2026 also supports energy measurements alongside performance metrics. A good design decision considers the workload’s completion time, its energy cost, and the power the system can sustain.

Key Takeaways

  • Multicore chips run multiple instruction streams on separate cores.
  • Lower voltage and frequency per core can improve total throughput within a similar dynamic-power budget.
  • A sequential task gains no extra execution capacity from unused cores.
  • Instruction-level overlap and thread-level parallelism are different mechanisms.
  • Independent requests can improve system throughput without reducing each request’s computation time.
  • Specialized and mixed-core hardware offer other ways to use transistors efficiently.

Computer Performance examples

5 Walkthroughs

1

Follow a computation from code to hardware

16 steps
Trace an addition through system layers, translation, and the interfaces that allow different processors to run compatible software.
  1. 1
    IntroductionOne addition, several views

    The C statement total = price + tax; describes a result, but leaves registers, instruction encodings, and switching circuits unstated. Those details live at different layers, each an abstraction that hides its work behind an interface.

    Follow the addition downward, then ask what must match for a binary to run on a different machine: the ISA and its conventions. This separates the behavior software relies on from the hardware choices that determine its performance.

  2. 2
    ExplanationAn interface hides internal work

    An abstraction exposes a useful service while hiding its internal implementation. An application can request a file read without controlling storage electronics.

    A common downward path is applications → systems software → ISA → microarchitecture → digital logic → circuits → transistors. Each view makes the system manageable by providing a boundary at which another designer can work.

  3. 3
    ExampleWho chooses what for the addition?

    For total = price + tax;, the compiler can choose registers and an add instruction. It does not need to design the adder’s gates.

    The microarchitect chooses execution hardware; the logic designer builds an adder from gates; circuit designers deal with electrical behavior. Meeting the interfaces lets each choice fit into the complete computation without exposing every lower detail to the programmer.

  4. 4
    ConnectionPlace the physical components

    The classic five components are input, output, memory, datapath, and control. The CPU combines datapath and control: one operates on data, the other directs the work.

    DRAM holds working memory, SRAM supplies small fast caches, and both are volatile. Flash and magnetic disks retain data without power. An operating system manages these resources as software executing on the CPU.

  5. 5
    ChallengeIdentify the changed layer

    An engineer replaces the gates inside an adder. Its machine instructions still produce all the same required results. Has the engineer necessarily changed the ISA? Explain.

    ---reveal---

    No. The engineer changed the digital-logic implementation. The ISA specifies the visible addition behavior; different gate arrangements can meet that same specification. They can nevertheless differ in delay, power, or area.

  6. 6
    Key InsightMore devices do not specify a task time

    A transistor acts as an electrically controlled switch, and a chip integrates many such devices. Moore’s law describes the historical trend of roughly doubling transistor counts about every two years.

    Ten doublings give a factor of 1,024 over about 20 years. That manufacturing trend, whose pace has slowed, does not specify how quickly one program runs. The added devices still need a useful organization and a workable power budget.

  7. 7
    ExplanationBuild an executable

    A compiler translates high-level source into assembly or object code. An assembler encodes assembly into an object file. A linker combines object files and library code, resolving references between them.

    The loader then maps the executable into memory and starts it. These jobs are distinct: translated code can still need a library reference resolved before it forms the executable used for the run.

  8. 8
    ExampleSelect registers and an instruction

    Suppose price is held in x6, tax in x7, and the result belongs in x5. The C addition can become:

    add x5, x6, x7
    

    The destination appears first in this assembly syntax. The instruction reads the two source registers, adds their values, and writes the result to the destination. The text is a symbolic instruction; the processor needs its binary encoding.

  9. 9
    ExampleEncode the same addition

    The R-type encoding fields, in stored bit order, are:

    • funct7: 0000000
    • rs2: 00111
    • rs1: 00110
    • funct3: 000
    • rd: 00101
    • opcode: 0110011

    Joined together, they encode 0x007302B3. The source-register fields precede the destination field in the bit layout even though the destination comes first in assembly text. Field positions let hardware interpret the same bits consistently.

  10. 10
    TipCount operations, not source lines

    Even with operands already in registers, f = (g + h) - (i + j); needs two additions and one subtraction. Loads add instructions when data begins in memory.

    Assembly shorthand can also hide a translation step: mv x5, x6 becomes addi x5, x6, 0. CPython interprets intermediate bytecode and Java commonly uses JIT compilation, but in every route the physical CPU eventually carries out machine instructions.

  11. 11
    ChallengeLocate an unresolved function

    Assembly has been converted into object code, but a call still refers to a function in another object file. What stage handles that reference, and what later stage starts the program?

    ---reveal---

    The linker resolves the reference while combining the object files. The loader later maps the resulting executable into memory and starts it. Loading does not replace the translation and reference-resolution work of the earlier build stages.

  12. 12
    ExplanationSeparate the contract from its implementation

    The ISA specifies instructions, encodings, registers, addressing, and other visible machine behavior. The microarchitecture chooses internal pipelines, execution units, caches, and related structures.

    Whether multiplication exists and what result it returns are ISA questions. Whether that multiplication takes one cycle or four is an implementation question. Two compatible processors can therefore compute the same result at different speeds.

  13. 13
    ConnectionAdd the binary conventions

    The ABI adds operating-system interfaces and conventions such as argument registers and data layout to the user-level ISA. A binary needs both the instruction features it uses and a compatible execution environment.

    RISC-V offers RV32I and RV64I bases plus optional extensions, including M for integer multiply/divide and F and D for floating point. Sharing a base ISA alone does not guarantee every extension or ABI a program expects.

  14. 14
    ChallengeChoose what compatibility really requires

    A binary runs on a new machine with a different cache size, but fails on another machine that lacks an instruction extension it uses. What explains the different outcomes?

    ---reveal---

    Cache size is an implementation choice that can affect speed while preserving the required ISA behavior. The missing extension removes instruction support the binary needs. Binary reuse requires the relevant ISA features and ABI; identical caches are not part of that requirement.

  15. 15
    ChallengeJudge the richer-instruction claim

    A proposed ISA instruction replaces several older instructions. Its designer claims this alone proves a faster program on the new machine. What else must be compared?

    ---reveal---

    Compare instruction count, average cycles per instruction, and clock period for the complete task. The new instruction may reduce count while increasing cycle cost or requiring a longer period. The translation benefit becomes a performance gain only through the complete timing product.

  16. 16
    RecapRead the whole path

    A source expression becomes instructions through translation and linking, then runs on hardware that implements an ISA. The ABI adds the conventions needed by the executable’s environment.

    Use that path to locate a change: code choices alter the instruction stream; implementation choices alter how it runs. Compatibility concerns required behavior, while performance depends on the work and timing throughout the lower layers.

2

Choose and interpret a performance measure

12 steps
Compare one task’s time with system throughput, then read CPU timings and convert clock units.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionDecide what completion means
  2. 2
    ExplanationMeasure one task or a stream
  3. 3
    ExampleReverse the time ratio
  4. 4
    ChallengeCan the same rate mean the same wait?
  5. 5
    ExplanationRead real, user, and system time
  6. 6
    Key InsightParallel CPU seconds add up
  7. 7
    ExampleTake the reciprocal in seconds
  8. 8
    TipKeep decimal and binary prefixes separate
  9. 9
    ChallengeInfer a clock period
  10. 10
    TipDescribe an actual run
  11. 11
    ChallengePredict elapsed time after a CPU upgrade
  12. 12
    RecapAttach the right unit to the claim
3

Build and test a CPU-time prediction

21 steps
Combine cycles, instruction mix, and clock rate, then check whether performance claims describe completed work.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionThree factors make one execution time
  2. 2
    ExplanationStart with the cycle budget
  3. 3
    ExampleRecover cycles before changing the design
  4. 4
    ConnectionThe clock cannot outrun required logic
  5. 5
    ChallengeIs the clock increase enough?
  6. 6
    ExplanationCPI is an execution-weighted average
  7. 7
    ExampleWork an instruction mix
  8. 8
    ExampleA longer stream can have a smaller cycle total
  9. 9
    Key InsightAn average below one is possible
  10. 10
    ChallengeCalculate cycles and the reciprocal rate
  11. 11
    ExplanationConvert instructions all the way to time
  12. 12
    ExampleCompare two equal instruction counts
  13. 13
    ConnectionLocate the design lever
  14. 14
    ChallengeRecover a measured CPI
  15. 15
    ExplanationChoose the benchmark metric
  16. 16
    ExampleMultiply ratios, then take the root
  17. 17
    ChallengeRead a throughput ratio
  18. 18
    ExampleCheck what a high MIPS result rewards
  19. 19
    TipRead peak figures as capacity
  20. 20
    ChallengePut the compiler and hardware changes together
  21. 21
    RecapTest the complete claim
4

Find which part limits a speedup

15 steps
Use time budgets to evaluate a local enhancement, a target speedup, and parallel execution on more cores.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionKeep the unchanged work in the budget
  2. 2
    ExplanationSplit original time before accelerating it
  3. 3
    ExampleAccelerate the floating-point part
  4. 4
    ExampleWork back from the target time
  5. 5
    Key InsightProfile the costly part
  6. 6
    ChallengeChoose the better improvement
  7. 7
    ExplanationUse cores only for parallel time
  8. 8
    ExampleAdd many cores to a 95% parallel task
  9. 9
    ExplanationDivide speedup by cores to find efficiency
  10. 10
    ExampleCompletion waits for the busiest core
  11. 11
    ChallengeRecover the serial constraint
  12. 12
    ConnectionChange the question when the work grows
  13. 13
    ChallengeCheck whether two claims conflict
  14. 14
    ChallengeInclude CPU work and file waiting
  15. 15
    RecapFind the residual time first
5

Explain the power wall and the multicore response

19 steps
Calculate dynamic power and energy, follow the breakdown of ideal scaling, and test the benefit of slower cores.

Save this lesson to follow every Walkthrough step by step.

  1. 1
    IntroductionPerformance has a heat budget
  2. 2
    ExplanationCount switching and leakage separately
  3. 3
    ExampleApply the voltage square
  4. 4
    ExampleCompare energy over a complete task
  5. 5
    Key InsightSlower frequency does not remove transitions
  6. 6
    ChallengeKeep the static component unchanged
  7. 7
    ExplanationThe ideal shrink kept power density stable
  8. 8
    ExampleCheck one ideal technology generation
  9. 9
    ExplanationVoltage could not keep following size
  10. 10
    ConnectionRead thermal limits as operating constraints
  11. 11
    ChallengeDiagnose the scaling failure
  12. 12
    ExplanationMore cores provide separate streams
  13. 13
    ExamplePrice two slower cores in dynamic power
  14. 14
    ExampleAsk whether the workload can use the pair
  15. 15
    ConnectionDistinguish instruction and thread overlap
  16. 16
    ConnectionUse specialized hardware for suitable work
  17. 17
    ChallengeChoose a design for independent work
  18. 18
    ChallengeCombine slowing, energy, and completion time
  19. 19
    RecapMatch the design to its useful work

Computer Performance practice questions

50 Practice Questions in 5 sets

Set 1: Connect the layers and basic performance measures10 Practice Questions

Question 1 of 10

A single-threaded timing report reads “real 4.4 s, user 2.7 s, sys 0.5 s.” What CPU time is charged to this task?
  1. 4.4 s
  2. 3.2 s
  3. 2.7 s
  4. 1.2 s
Show answerHide answer
Answer: B
CPU time includes both user execution and operating-system execution on the task’s behalf, giving 2.7 plus 0.5, or 3.2 s. Taking only 2.7 s drops system CPU time. The 4.4 s elapsed time also includes intervals when the task is not using the processor.

Question 2 of 10

A task uses 7.5 billion cycles at a constant 2.5 GHz. What is its CPU time?
  1. 3.0 s
  2. 0.3 s
  3. 5.0 s
  4. 18.75 s
Show answerHide answer
Answer: A
Divide 7.5 billion cycles by 2.5 billion cycles per second to obtain 3.0 s. Multiplying the two numbers gives 18.75 but does not produce a duration. The cycle count must be multiplied by seconds per cycle, or divided by cycles per second.

Question 3 of 10

A program executes 70% ALU instructions at 1 cycle each and 30% memory instructions at 5 cycles each. What is its average CPI?
  1. 3.0
  2. 1.8
  3. 2.5
  4. 2.2
Show answerHide answer
Answer: D
Weight each cycle cost by its instruction fraction: 0.70 times 1 plus 0.30 times 5 gives 2.2 cycles per instruction. The simple mean of the class costs is 3.0, but that treats the two classes as equally common. Their executed counts are unequal.

Question 4 of 10

A developer treats a file read as an operating-system service without controlling storage electronics. What idea makes that separation possible?
  1. Compilation into a new instruction set
  2. Adding physical storage to main memory
  3. Abstraction through a defined interface
  4. Combining datapath and control logic
Show answerHide answer
Answer: C
Abstraction exposes the service the developer needs while hiding its implementation. The operating-system interface lets the program request a file read without managing device circuits. Compilation translates code, but it is not the idea that explains why a service can hide its internal details.

Question 5 of 10

An object file calls a function defined in a separate object file. Which tool resolves that reference when building the executable?
  1. The linker
  2. The compiler
  3. The assembler
  4. The loader
Show answerHide answer
Answer: A
The linker combines object files and resolves references between their code and data. An assembler can produce machine code while leaving an external function reference unresolved. The loader starts the resulting executable; it does not replace the linking stage described here.

Question 6 of 10

A service completes 1,800 jobs in 90 s. What is its throughput?
  1. 30 jobs/s
  2. 0.05 jobs/s
  3. 1,710 jobs/s
  4. 20 jobs/s
Show answerHide answer
Answer: D
Throughput is completed work divided by the time interval, so 1,800 divided by 90 gives 20 jobs per second. Dividing in the opposite direction gives 0.05 seconds per job, a time per completion. That reciprocal is not a throughput in jobs per second.

Question 7 of 10

The same conversion takes 18 s on machine L and 12 s on machine M. How do M’s performance and execution time compare with L’s?
  1. 1.5 times the performance; 50.0% less time
  2. 1.5 times the performance; 33.3% less time
  3. 0.67 times the performance; 33.3% less time
  4. 1.33 times the performance; 25.0% less time
Show answerHide answer
Answer: B
Performance is inverse time, so M has 18 divided by 12, or 1.5 times L’s performance. The time reduction is 6 divided by the original 18, about 33.3%. A 50% performance increase does not mean a 50% reduction in time because the two percentages have different denominators.

Question 8 of 10

A task originally executes 1.5 billion instructions at CPI 2.0 and 3 GHz. New code executes 1.2 billion instructions at CPI 2.8. What constant clock rate would make the new code finish 20% sooner than the original?
  1. 3.36 GHz
  2. 3.5 GHz
  3. 4.2 GHz
  4. 4.0 GHz
Show answerHide answer
Answer: C
The original time is 1.0 s, so the target is 0.8 s. New code requires 1.2 times 2.8, or 3.36 billion cycles; dividing by 0.8 s gives 4.2 GHz. A rate of 3.36 GHz only restores the original 1.0 s and misses the requested improvement.

Question 9 of 10

A 100 s task spends 40 s in a routine. The routine becomes four times as fast and all remaining work is unchanged. What is the new task time?
  1. 25 s
  2. 85 s
  3. 70 s
  4. 60 s
Show answerHide answer
Answer: C
The routine’s 40 s becomes 10 s, while the unaffected work still takes 60 s, giving 70 s in total. Dividing the full 100 s by four would incorrectly accelerate the unchanged portion. A local speedup applies only to the original time spent in the improved routine.

Question 10 of 10

A CMOS design reduces voltage to 90% and frequency to 80% of their previous values, with capacitance and activity unchanged. What fraction of the original dynamic power remains?
  1. 0.648
  2. 0.720
  3. 0.810
  4. 0.576
Show answerHide answer
Answer: A
Dynamic power scales with voltage squared and frequency, so the ratio is 0.90 squared times 0.80, or 0.648. Multiplying voltage and frequency directly gives 0.720 and misses voltage’s squared effect. The result concerns dynamic power; no static-power value is provided.
Set 2: Read workloads, mixes, and design changes10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

A designer changes the gates used inside an adder while keeping every ISA-visible result unchanged. At which layer does the gate-level change belong?
  1. Applications
  2. Digital logic
  3. System software
  4. ABI conventions
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A compiler has already emitted assembly text, and the program still needs an external library function. What are the next main stages before execution begins?
  1. Linking, compilation, then loading
  2. Loading, assembly, then linking
  3. Assembly, loading, then linking
  4. Assembly, linking, then loading
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A run uses four cores and reports 2.0 s elapsed with 6.8 s of combined user and system CPU time. What does that report show?
  1. An average of 3.4 cores’ worth of CPU work
  2. A physically impossible timing result
  3. Exactly 4.8 s spent waiting for storage
  4. A clock rate of 3.4 GHz per active core
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A processor completes an average of 2 instructions per cycle during a run. What is the corresponding CPI?
  1. 2.0
  2. 1.0
  3. 0.5
  4. 0.2
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

On one fixed-frequency processor, ALU instructions cost 1 cycle and memory instructions cost 4. Build U executes 600 million ALU and 200 million memory instructions; build V executes 900 million ALU and 100 million memory instructions. Which build finishes first, and by what speedup?
  1. V; about 1.077 times as fast
  2. U; about 1.250 times as fast
  3. V; about 1.400 times as fast
  4. U; about 1.077 times as fast
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Three programs produce normalized speed ratios of 1, 4, and 16. What geometric-mean score summarizes them?
  1. 7
  2. 8
  3. 4
  4. 16
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A fixed task takes 160 s on one core, including 40 s that must remain serial. On eight cores, its parallel work divides evenly and coordination adds 5 s after the work. What are the overall speedup and parallel efficiency?
  1. About 2.91 and 36.4%
  2. About 3.20 and 40.0%
  3. About 2.67 and 66.7%
  4. About 2.67 and 33.3%
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

What change broke the ideal scaling pattern that had allowed faster clocks at roughly constant power density?
  1. Transistor counts stopped growing on every chip
  2. Voltage stopped falling in step with device size
  3. Clock periods became independent of circuit delay
  4. Instruction counts became fixed by source lines
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A chip replaces one 3 GHz core with four 3 GHz cores that have the same per-core performance. A fully sequential task had no queueing delay. How does the core-count change affect that task’s computation time?
  1. It becomes one quarter as long
  2. It remains the same on one core
  3. It becomes three quarters as long
  4. It becomes four times as long
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A processor completes 1.8 billion instructions in 1.2 CPU seconds, and counters record 3.6 billion cycles. A report lists the processor as “3.6 GHz.” What CPI and effective average frequency describe this run?
  1. CPI 2.0 and 3.0 GHz
  2. CPI 1.5 and 3.6 GHz
  3. CPI 2.4 and 3.6 GHz
  4. CPI 2.0 and 4.32 GHz
Show answerHide answer

Save this lesson to see this answer.

Set 3: Find bottlenecks and compare complete designs10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Two processors support the same user ISA and extensions, but their operating systems use different system-call and calling conventions. Why is a binary for one environment not guaranteed to run unchanged in the other?
  1. Their ABIs differ despite the shared ISA
  2. Their cache sizes must be identical
  3. Their ISAs must use different add encodings
  4. Their clock rates must match for compatibility
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

An unchanged portion of a task takes 25% of its original time. What overall speedup does accelerating only the remaining portion approach as its local speedup grows without bound?
  1. 3
  2. 2.5
  3. 4
  4. 5
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A design needs 15% more cycles for a program but raises its clock rate by 25%. What is its new CPU time as a fraction of the old CPU time?
  1. 0.80
  2. 1.10
  3. 1.4375
  4. 0.92
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A clock’s period is reduced from 625 ps to 500 ps. What are its new frequency and its percentage increase in frequency?
  1. 2.0 GHz; 20% higher
  2. 2.0 GHz; 25% higher
  3. 1.6 GHz; 25% higher
  4. 1.6 GHz; 20% higher
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

For the same task on one processor, build H reports 2,000 MIPS and 0.9 CPU s; build J reports 1,500 MIPS and 0.8 CPU s. What does the comparison establish?
  1. H executes 33% more instructions and is faster
  2. H executes 50% more instructions and is slower
  3. H executes 50% more instructions and is faster
  4. H executes 33% more instructions and is slower
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A 200 s task spends 120 s in a routine eligible for acceleration. A designer promises a threefold overall speedup by changing only that routine. How should the promise be judged?
  1. Feasible; a threefold local speedup reaches the target
  2. Feasible; a sixfold local speedup reaches the target
  3. Possible only if the routine’s time reaches exactly zero
  4. Impossible; the unchanged 80 s exceeds the target time
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A program achieves a speedup of 6 on 10 cores. What is its parallel efficiency?
  1. 60%
  2. 40%
  3. 67%
  4. 6%
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

At fixed voltage, a task takes 2 s with 40 W dynamic power and 10 W static power. Halving frequency doubles its duration and halves dynamic power, while static power stays 10 W. What is the new total task energy?
  1. 80 J, which is 20 J less
  2. 100 J, which is unchanged
  3. 120 J, which is 20 J more
  4. 200 J, which is 100 J more
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

In an ideal Dennard shrink by a factor of 2, how do power per transistor and transistor density change?
  1. Power becomes one half; density becomes twofold
  2. Power becomes one quarter; density becomes fourfold
  3. Power stays unchanged; density becomes fourfold
  4. Power becomes one eighth; density becomes fourfold
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

One 4 GHz core at 1.2 V is replaced by two 3 GHz cores at 1.0 V, with equal capacitance and activity per core and equal work per cycle. A workload has an 80% parallel fraction on the original core. With no overhead, how does its new completion time compare with the old time?
  1. 0.67 times as long
  2. 0.75 times as long
  3. 0.80 times as long
  4. 1.33 times as long
Show answerHide answer

Save this lesson to see this answer.

Set 4: Diagnose claims and reconstruct missing quantities10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

An application produces the same results on two compatible computers, but memory-intensive work is much slower on one. How can abstraction account for both observations?
  1. Interfaces require identical hardware whenever results match
  2. Different times show that the application must use a different ISA
  3. Memory performance is fixed by the high-level language specification
  4. Interfaces preserve required behavior while lower-layer designs affect time
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

In RISC-V assembly, mv x9, x10 can assemble as addi x9, x10, 0. What kind of assembly construct is mv here?
  1. A system-call interface
  2. A pseudo-instruction
  3. A binary file format
  4. A hardware clock cycle
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

A single-threaded task reports 9 s elapsed, 5 s user, and 1 s system time. One upgrade doubles CPU speed; another halves the non-CPU time. All other times stay fixed. What elapsed time results from applying both upgrades?
  1. 4.5 s
  2. 3.0 s
  3. 4.0 s
  4. 6.0 s
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

A 2.4 GHz processor runs a task in 5 s. A replacement needs 30% more cycles and has a clock period of 250 ps. What is the replacement’s CPU time and the task speedup?
  1. 3.0 s and about 1.67
  2. 6.5 s and about 0.77
  3. 3.9 s and about 1.28
  4. 3.9 s and about 0.78
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A program uses the RISC-V M extension and a particular operating-system ABI. A new machine supports the same ABI conventions but only the base RV64I ISA. What additional native support does the binary need?
  1. An identical first-level cache capacity
  2. Support for its M-extension instructions
  3. A clock rate equal to the original machine’s
  4. A compiler that emits exactly as many instructions
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

Two programs take 8 s and 32 s on X, and 16 s and 18 s on Y. Using the geometric mean of their per-program speed ratios, how does X compare with Y?
  1. X is about 1.281 times as fast
  2. Y is about 1.061 times as fast
  3. X is about 1.061 times as fast
  4. Y is about 1.176 times as fast
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A rate benchmark uses a reference time of 240 s and completes six copies in a measured interval of 120 s. What is the rate ratio?
  1. 12
  2. 2
  3. 6
  4. 3
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A fixed task contains 10% serial work. A designer wants ideal parallel efficiency of at least 50% on 16 cores. Can this task meet that target without changing its serial fraction?
  1. Yes; ideal efficiency is about 64%
  2. Yes; ideal efficiency is about 53%
  3. No; ideal efficiency is only 10%
  4. No; ideal efficiency is only 40%
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

Run A uses an average of 24 W for 2.5 s. Run B uses 36 W for 1.5 s for the same task. Which run uses less energy, and by how much?
  1. A uses 12 J less
  2. B uses 24 J less
  3. B uses 6 J less
  4. A uses 6 J less
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A technology change halves capacitance and quadruples active-device density, but voltage cannot fall. Designers hold frequency and activity per device constant. What happens to dynamic power per area?
  1. It remains constant
  2. It doubles
  3. It falls to one half
  4. It rises fourfold
Show answerHide answer

Save this lesson to see this answer.

Set 5: Integrate time, parallelism, and power budgets10 Practice Questions

Save this lesson to see every answer and practice every set.

Question 1 of 10

Which interface specifies how a compiled function passes arguments in registers?
  1. The instruction set architecture
  2. The application binary interface
  3. The processor’s microarchitecture
  4. The program loader’s memory map
Show answerHide answer

Save this lesson to see this answer.

Question 2 of 10

A service initially has one core; every sequential request needs 0.20 s of computation. It switches to four cores, each taking 0.25 s per request. With independent requests and no other limits, what happens to maximum throughput and each request’s computation time?
  1. Throughput rises 4-fold; computation time falls 75%
  2. Throughput rises 3.2-fold; computation time falls 20%
  3. Throughput rises 3.2-fold; computation time rises 25%
  4. Throughput rises 5-fold; computation time rises 25%
Show answerHide answer

Save this lesson to see this answer.

Question 3 of 10

Five controlled elapsed-time measurements are 1.8 s, 1.9 s, 7.2 s, 2.0 s, and 2.1 s. What median time represents these runs?
  1. 2.0 s
  2. 1.9 s
  3. 3.0 s
  4. 2.1 s
Show answerHide answer

Save this lesson to see this answer.

Question 4 of 10

At a fixed clock rate, a program executes 75% ALU instructions costing 1 cycle and 25% memory instructions costing 5 cycles. An optimization leaves counts unchanged and halves only the memory class’s cycle cost. What overall CPU speedup results?
  1. About 1.143
  2. About 1.600
  3. About 1.818
  4. About 1.455
Show answerHide answer

Save this lesson to see this answer.

Question 5 of 10

A new compiler reduces instruction count by 20% and raises CPI by 25%. The new hardware clock is 10% faster. For the same task, what is the final speedup?
  1. 1.00
  2. 1.125
  3. 1.10
  4. 1.375
Show answerHide answer

Save this lesson to see this answer.

Question 6 of 10

A chip doubles its identical active core count and reduces frequency per core to 75% of the old value. With capacitance and activity per core unchanged, what largest voltage ratio keeps total dynamic power at or below its old value?
  1. About 0.667
  2. About 0.866
  3. About 0.943
  4. About 0.816
Show answerHide answer

Save this lesson to see this answer.

Question 7 of 10

A 180 s task includes 45 s that an enhancement cannot change. What local speedup of the remaining work is needed to achieve a threefold overall speedup?
  1. 9
  2. 3
  3. 6
  4. 12
Show answerHide answer

Save this lesson to see this answer.

Question 8 of 10

A 20-core scaled workload spends 10% of its measured parallel-run time in serial work. Under Gustafson’s model, what scaled speedup follows, and can that value be used as Amdahl’s speedup for an unchanged one-core task with a 10% serial fraction?
  1. 10.0; yes, both models use the same fraction
  2. 18.1; no, the workload and fraction basis differ
  3. 18.1; yes, both models describe fixed work
  4. 6.90; no, the workload and fraction basis differ
Show answerHide answer

Save this lesson to see this answer.

Question 9 of 10

A design has 50 W dynamic power and 20 W static power. Frequency is unchanged, voltage falls by 10%, and static power remains 20 W. What is its new total power?
  1. 56.7 W
  2. 63.0 W
  3. 40.5 W
  4. 60.5 W
Show answerHide answer

Save this lesson to see this answer.

Question 10 of 10

A media server replaces one CPU core with four cores that each run conversions more slowly. Its unchanged conversion program uses one CPU thread. Why can many independent conversions finish at a higher rate while each conversion takes longer?
  1. More jobs run concurrently, while each job uses one slower core.
  2. Each job combines four slower cores into one faster instruction stream.
  3. The new cores shorten each job’s CPU time by removing serial work.
  4. The clock rates of the four cores add together for each conversion.
Show answerHide answer

Save this lesson to see this answer.

Stuck on your own question? Homework Help

Key Terms

93 Key Terms, each with its definition

A

Abstraction
An abstraction is a simplified view that exposes useful behavior while hiding details of how a component implements it.
An operating-system file interface is an abstraction that lets an application request data without controlling disk circuits.
Accelerator
An accelerator is specialized hardware designed to perform a selected class of work efficiently compared with general-purpose execution.
A video accelerator can improve suitable encoding work when software directs that work to the specialized hardware.
Activity factor
An activity factor expresses how much capacitance switches per clock cycle under the counting convention used in a power model.
A dynamic-power ratio that holds activity factor fixed assumes the switching activity remains comparable.
Affected fraction
The affected fraction is the share of original execution time spent on work that a proposed enhancement can accelerate.
Memory operations can have an affected fraction of 60% of time while forming only 30% of instructions.
Amdahl’s law
Amdahl’s law relates overall speedup to the original time fraction improved and its local speedup, keeping unaffected time unchanged.
Amdahl’s law explains why tripling one routine’s speed gives less than a threefold improvement for the whole task.
Application binary interface
An application binary interface specifies binary conventions and operating-system interfaces alongside the user-level ISA.
Matching the application binary interface lets a function call use the argument registers expected by its callee.
Assembler
An assembler translates symbolic assembly language into machine-instruction encodings, usually producing an object file.
The assembler turns add x5, x6, x7 into its binary encoding and expands supported pseudo-instructions.
Assembly language
Assembly language is a symbolic text form of machine instructions, with register names and operation names readable by people.
The assembly language line add x5, x6, x7 names a destination and two source registers.

B

Backward compatibility
Backward compatibility is support for software built for an earlier interface or platform within the newer system’s supported environment.
Backward compatibility can preserve old binaries while internal processor designs change substantially.
Benchmark
A benchmark is a defined program workload used to measure a system’s performance on work chosen to represent a practical need.
A benchmark matching an application’s behavior is more informative than a peak rate unrelated to that workload.
Benchmark suite
A benchmark suite is a collection of workloads used to measure several aspects of a system instead of relying on one program.
A benchmark suite can expose differences that one favorable program would hide in a processor comparison.
Binary prefix
A binary prefix denotes a power-of-two size multiplier, such as KiB for 1,024 bytes or GiB for 1,073,741,824 bytes.
The binary prefix in KiB distinguishes 1,024-byte units from the decimal powers used in clock-frequency units.
Bytecode
Bytecode is an intermediate instruction format for a language runtime, which can interpret it or translate it further into machine code.
CPython compiles source into bytecode before its interpreter carries out the corresponding operations.

C

Calling convention
A calling convention is an ABI rule for communication between compiled functions, including where arguments and results are passed.
The calling convention tells separately compiled functions which registers contain their incoming arguments.
Capacitive load
A capacitive load is the electrical capacitance a signal must charge and discharge, set by the devices and wires it drives.
Reducing capacitive load lowers dynamic power when voltage, frequency, and switching activity remain unchanged.
Clock period
The clock period is the duration of one clock cycle, equal to the reciprocal of clock rate when units are consistent.
A clock period of 250 ps corresponds to 4 GHz because period and frequency are reciprocals.
Clock rate
The clock rate is the number of hardware clock cycles per second, measured in hertz and often expressed in gigahertz.
A clock rate of 4 GHz provides four billion cycles per second, not four billion completed source statements.
CMOS
CMOS is the transistor technology used in modern processors, with energy costs from switching signals and static leakage.
A CMOS power estimate separates dynamic switching consumption from draw that persists without useful transitions.
Compiler
A compiler translates high-level program code into a lower-level form such as assembly or object code for a target machine.
The compiler chooses registers and an add instruction when translating an arithmetic expression.
Control
Control is the processor component that directs datapath operations and coordinates memory and I/O according to instructions.
Control selects the operation and destination needed when the CPU executes a machine instruction.
CPU clock cycles
CPU clock cycles are the total processor ticks attributed to a program’s execution, including cycles required by its effective instruction costs.
Six billion CPU clock cycles take 2 s when the measured clock rate is 3 GHz throughout the execution.
CPU performance equation
The CPU performance equation relates CPU time to instruction count, average CPI, and clock period, multiplying the three factors.
The CPU performance equation reveals why a smaller instruction count can lose its benefit when CPI increases.
CPU time
CPU time is processor execution time charged to a task, combining its user execution with system execution on its behalf.
CPU time summed over several busy cores can exceed the task’s start-to-finish elapsed time.
Critical path
A critical path is the slowest required logic path between registers, constraining how short a safe synchronous clock period can be.
Reducing work along the critical path can allow a shorter clock period, though cycle count may also change.
Cycle budget
A cycle budget is the total number of processor cycles available or required for a task at a specified timing target.
A 4 GHz processor has a cycle budget of 36 billion cycles if the task must finish within 9 s of CPU time.
Cycles per instruction
Cycles per instruction is total CPU cycles divided by executed instructions for a run, averaging the effective cost of those instructions.
Cycles per instruction rises when expensive memory-wait cycles make up more of the same program’s execution.

D

Dark silicon
Dark silicon describes chip hardware that cannot all operate at full speed at once within the available power and thermal budget.
A chip may leave some units inactive because dark silicon limits simultaneous use, despite having the devices on the die.
Datapath
A datapath is the part of a processor that holds and operates on data, carrying out operations directed by control.
The datapath adds two register values when control directs the machine to execute an addition.
Dennard scaling
Dennard scaling is an ideal device-scaling model in which reduced dimensions and voltage allow higher speed at roughly constant power density.
Dennard scaling breaks down when voltage no longer falls enough to offset the power of more active, faster devices.
DRAM
DRAM is volatile main-memory technology used to hold programs and data while a computer runs; it loses its contents without power.
A program’s working data can be held in DRAM even though a saved file remains on nonvolatile storage.
DVFS
DVFS is dynamic voltage and frequency scaling, which adjusts a chip’s voltage and operating frequency together during use.
DVFS can reduce voltage for a lower-frequency operating point when the required switching speed permits it.
Dynamic energy
Dynamic energy is energy used in signal transitions, scaling with capacitive load and the square of supply voltage.
At the same voltage, a fixed number of identical transitions uses the same dynamic energy even when slowed down.
Dynamic power
Dynamic power is the rate of energy use from switching, proportional to activity, capacitance, voltage squared, and frequency.
A 10% voltage reduction at unchanged frequency and activity lowers dynamic power to 81% of its old value.

E

Effective average frequency
The effective average frequency for a run is its counted CPU cycles divided by the matching CPU execution time.
Effective average frequency accounts for a run that boosts or throttles instead of using one advertised rate.
Elapsed time
Elapsed time is the start-to-finish wall-clock duration of an execution, including CPU work, waiting, and scheduling delays.
A file wait can increase elapsed time without adding an equal amount of CPU execution charged to the task.
Energy
Energy is the accumulated amount used over a time interval, calculated for a task as average power multiplied by duration.
A 20 W average draw over 3 s uses 60 J of energy, which is distinct from the 20 W operating rate.
Energy proportionality
Energy proportionality is the design goal of making a system’s power consumption track the amount of useful work it performs.
A server with high idle draw falls short of energy proportionality even if its peak-workload efficiency is good.
Executable
An executable is a program file prepared for a particular machine and operating-system environment that the loader can start.
The linker produces an executable after combining object code and resolving the required references.

G

Geometric mean
The geometric mean of positive values is the root of their product, with the root’s degree equal to the number of values.
The geometric mean of normalized benchmark ratios keeps machine comparisons independent of the reference choice.
Gustafson’s law
Gustafson’s law models scaled speedup when parallel work grows with processor count while serial time stays fixed in the model.
Gustafson’s law uses a serial fraction measured on the parallel run, unlike the fraction in fixed-task Amdahl analysis.

H

Heterogeneous cores
Heterogeneous cores are different core designs within one processor, often combining fast high-power cores with smaller efficient ones.
A chip with heterogeneous cores can assign different work to core types with different performance and power costs.

I

Instruction count
An instruction count is the number of machine instructions actually executed for a task, including repeated loop iterations.
A compiler can increase instruction count while reducing total cycles by replacing costly instructions with cheaper ones.
Instruction mix
An instruction mix is the distribution of executed instructions among classes, used to weight each class’s cycle cost.
A mix with many costly loads can have a higher CPI than a mix dominated by simple arithmetic instructions.
Instruction set architecture
An instruction set architecture defines the machine instructions, registers, addressing, and behavior visible to low-level software.
Two different processor designs can obey the same instruction set architecture while taking different times for a task.
Instruction-level parallelism
Instruction-level parallelism overlaps operations within an instruction stream, using hardware and compiler techniques to increase execution rate.
Pipelining contributes instruction-level parallelism without requiring the program to create a thread for every operation.
Instructions per cycle
Instructions per cycle is executed instruction count divided by CPU cycles for a run, the reciprocal of its average CPI.
Instructions per cycle can exceed one when a processor overlaps enough instructions to complete several per cycle.
Integrated circuit
An integrated circuit is a chip containing many connected electronic devices, including transistors, on a piece of semiconductor material.
One integrated circuit can contain several processor cores, caches, and other support hardware.
Interpreter
An interpreter is a program that reads operations in another program representation and carries them out using its own execution.
A bytecode interpreter executes machine instructions to implement the bytecode operations it reads.

J

Just-in-time compilation
Just-in-time compilation translates code into machine instructions during execution, often focusing on frequently used code.
A Java virtual machine can use just-in-time compilation after identifying a frequently executed method.

L

Leakage current
Leakage current is current flowing through nominally off transistors, contributing to static power in a powered chip.
Lowering switching thresholds can increase leakage current, complicating further supply-voltage reduction.
Linker
A linker combines object files and library code and resolves references to functions and data defined in separate files.
The linker connects a call in one object file to the library function that supplies its implementation.
Load imbalance
Load imbalance is an uneven distribution of parallel work that leaves some processors waiting while another finishes its larger share.
When one core receives 40 work units and the others receive much less, load imbalance limits completion to that core.
Loader
A loader is operating-system support that maps an executable into memory and prepares it to begin running on the machine.
After a program has been linked, the loader arranges its memory image before execution starts.
Local speedup
A local speedup is the factor by which an enhancement accelerates its affected part, before accounting for the rest of the task.
A local speedup of four divides the original affected time by four while leaving other work unchanged.

M

Machine language
Machine language consists of binary-encoded instructions that a processor can execute according to its instruction set architecture.
The hexadecimal value 0x007302B3 represents a machine language encoding for a RISC-V addition.
Microarchitecture
A microarchitecture is the internal organization of hardware that implements an ISA, including execution units, pipelines, and caches.
A larger cache changes microarchitecture without necessarily changing the instruction encodings a binary uses.
MIPS
MIPS is a rate of millions of executed machine instructions per second of CPU time, which does not measure useful task work directly.
A build can have higher MIPS yet finish later if it executes enough additional instructions for the same task.
Moore’s law
Moore’s law is the historical manufacturing trend toward roughly doubling transistor counts on a chip about every two years.
Ten doublings under Moore’s law would multiply a transistor count by 1,024, without guaranteeing the same speedup.
Multicore processor
A multicore processor contains several cores on one chip, each able to execute its own instruction stream while sharing some resources.
A multicore processor can handle independent requests concurrently without merging its cores into one faster clock.

O

Object file
An object file holds translated code and related information that can be combined with other files to build an executable.
An object file can contain machine instructions while still referring to a function that the linker must resolve.
Operating system
An operating system is software that manages hardware resources and provides services so programs can share the computer safely.
The operating system schedules another program while one application waits for a storage operation.

P

Parallel efficiency
Parallel efficiency is achieved or predicted speedup divided by processor count, expressing the gain relative to ideal linear speedup.
A speedup of six on eight cores gives parallel efficiency of 75%, even though the task is substantially faster.
Parallel fraction
The parallel fraction in fixed-task Amdahl analysis is the fraction of original single-core time that can be divided across cores.
A parallel fraction of 0.95 leaves 5% of the original time serial, limiting gains from extra cores.
Peak rate
A peak rate describes an ideal maximum processing capacity under favorable conditions, rather than an application’s measured result.
A memory-intensive program may achieve much less than a chip’s peak rate because execution waits for data.
Performance
For a fixed task, performance is the inverse of execution time, so a shorter duration represents a larger performance value.
Halving the time for the same completed task doubles its performance, provided the work being compared is unchanged.
Performance counter
A performance counter is hardware support for counting execution events, such as cycles or instructions, over a measured interval.
A performance counter records cycles that can be divided by the matching instruction count to estimate CPI.
Performance per watt
Performance per watt is useful processing performance divided by power draw, expressing how much performance a power budget supports.
More throughput at similar power improves performance per watt when both results describe the same kind of useful work.
Pipelining
Pipelining overlaps stages of successive instructions so a processor can complete work at a higher rate than fully sequential processing.
Pipelining can improve effective CPI or permit a shorter clock period without changing the ISA’s promised results.
Power
Power is the rate at which energy is used, measured in watts, where one watt equals one joule per second.
A higher power draw can still use less task energy when the program finishes sufficiently sooner.
Power density
Power density is power dissipated per unit area, often expressed in watts per square millimeter when discussing chips.
More active transistors in the same area can raise power density unless power per device falls enough.
Power gating
Power gating disconnects the supply to an idle hardware region to reduce leakage, instead of merely leaving that region unused.
A chip uses power gating after a task finishes so inactive circuitry draws less static power.
Power wall
The power wall is the constraint on further clock-rate growth imposed by power consumption and the heat a practical system can remove.
The power wall encouraged designers to spend extra transistors on several cores instead of ever-higher clocks.
Profiling
Profiling measures how execution time or related activity is distributed across parts of a program to identify worthwhile improvements.
Profiling can show that a modest improvement to a common routine saves more time than a large gain in a rare one.
Pseudo-instruction
A pseudo-instruction is assembly shorthand that an assembler expands into one or more real machine instructions.
RISC-V’s mv x5, x6 is a pseudo-instruction that can be implemented as addi x5, x6, 0.

R

Response time
Response time is the duration from the start of a task to its completion, including relevant computation, I/O, and waiting.
A user waiting for a conversion result cares about response time even if the service finishes many other jobs.
RISC-V
RISC-V is an open, royalty-free instruction set architecture with base integer sets and optional standard instruction extensions.
A RISC-V program using integer multiplication instructions needs support for the relevant extension.

S

Serial fraction
The serial fraction is the share of execution time that must run without division across cores, measured on the model’s stated basis.
Amdahl uses an original single-core serial fraction, while Gustafson uses the fraction on the parallel run.
SPECrate
SPECrate is the SPEC CPU metric family that measures throughput by running multiple copies and accounting for work completed.
A SPECrate ratio includes the number of copies along with reference time divided by the measured interval.
SPECspeed
SPECspeed is the SPEC CPU metric family that measures completion time for one copy of a benchmark; the copy can use multiple threads.
A SPECspeed result concerns one program copy’s time, so it must not be read as the rate for many separate copies.
Speedup
A speedup is the ratio of an original execution time to the new execution time for the same task after a change.
A speedup of 1.25 means the new time is 80% of the old time, a 20% reduction in duration.
SRAM
SRAM is a volatile memory technology used for small, fast storage structures such as caches close to processor execution hardware.
A processor keeps recently used data in an SRAM cache to reduce the time spent accessing main memory.
Static power
Static power is consumption that persists without useful switching because powered devices pass leakage current.
Static power continues during a longer run even when reducing frequency lowers its dynamic power.
Strong scaling
Strong scaling measures how execution time changes with processor count while the total problem size remains fixed.
A strong scaling test runs the same simulation size on more cores and measures how much sooner it finishes.
System CPU time
System CPU time measures processor time spent executing operating-system code on behalf of the task being timed.
A program’s CPU time includes system CPU time used to service its operating-system requests.
Systems software
Systems software provides shared services and program-translation support, including operating systems, compilers, linkers, and libraries.
An application relies on systems software to allocate memory and prepare executable code for the processor.

T

Thermal design power
Thermal design power is a thermal-design target for selecting cooling under specified operating conditions, not an instantaneous power reading.
Cooling designed around thermal design power must account for the processor’s specified operating conditions.
Thermal throttling
Thermal throttling reduces a processor’s operating speed when temperature reaches limits, helping the chip control heat production.
Thermal throttling can lengthen CPU time by lowering the effective clock rate during a sustained workload.
Thread-level parallelism
Thread-level parallelism runs separate software instruction streams concurrently, allowing multiple cores to contribute to execution.
A parallel library can expose thread-level parallelism so independent parts of one task use different cores.
Throughput
Throughput is the amount of completed work per unit of time, such as requests per second or jobs per hour.
Running independent jobs on more cores can raise throughput while each job’s computation takes the same time.
Transistor
A transistor is an electrically controlled device that acts as a switch, supporting the circuits used to build digital logic.
Many transistors work together in a circuit that implements an adder inside a processor.

U

User CPU time
User CPU time measures processor time spent executing a program’s own user-level code, excluding operating-system execution.
A timing tool reports user CPU time separately from time spent in system services requested by the program.

W

Weak scaling
Weak scaling grows total problem size in proportion to processor count so that the amount of work per processor stays roughly fixed.
A weak scaling study expands the simulation as more processors become available, keeping similar work on each.
Weighted mean
A weighted mean gives each value a contribution proportional to its weight, such as the execution fraction of an instruction class.
The weighted mean CPI gives a frequent ALU instruction more weight than a rarely executed branch class.

About this lesson

By StudeliReport a mistake

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started