Download Introduction to Computer Architecture and more Lecture notes Computer Architecture and Organization in PDF only on Docsity! Inf3 Computer Architecture - 2015-2016 1 Summary: Computer Architecture What is Computer Architecture? Computer Architecture: • ISA • Microarchitecture • Hardware implementation Operating System (OS) Technology Logic design Programming Languages Compilers Applications Users Metrics of interest for computer architects – Performance – Cost – Reliability – Power – Area Inf3 Computer Architecture - 2015-2016 2 Performance of Computer Architectures ▪ Metrics: – Execution time, response time: overall time for a given computation (e.g. full program execution, one transaction) – Latency: time to complete a given task (e.g. memory latency, I/O latency, instruction latency) – Bandwidth, throughput: rate of completion of tasks (e.g. memory bandwidth, transactions per second, MIPS, FLOPS) ▪ MHz, MIPS, FLOPS: must use with caution ▪ Benchmarking: – toy benchmarks, synthetic benchmarks, kernels, real programs, – Input sets – E.g. SPECint, SPECfp, EEMBC Coremark Amdahl’s Law
Speedup due to an enhancement E:
Times. ST |
Time, i
Execution time w/o E (Before)
Ss =
peach (6) Execution time w E (After)
Suppose that enhancement E accelerates a fraction F
of the task by a factor S, and the remainder of the task
is unaffected, what is the Execution time,,,.,.and
Speedup(E)?
Inf3 Computer Architecture - 2013-2014
teens
Amdahl’s Law
on ti F
Execution tim€ssrer = ExTimesesore * [(1-F) + —
ExTimerefore 1
Speedup(E) = 5 E
ExTimectrer [(1-F) + = ]
Inf3 Computer Architecture - 2013-2014
Inf3 Computer Architecture - 2013-2014 Amdahl’s Law - Example 7 Inf3 Computer Architecture - 2015-2016 10 Examples • Branch instructions take 2 cycles, all other instructions take 1 cycle • CPU A uses extra compare instruction per branch • Clock frequency of CPU A is 1.25 times faster than CPU B • On A 20% of instructions are branches (thus other 20% are compare instructions) Example: Find the CPU time CPIA = IC CPIbranch x ICbranch + IC CPIothers x ICothers = 2 x 0.2 + 1 x 0.8 = 1.2 CPIB = IC CPIbranch x ICbranch + IC CPIothers x ICothers = 2 x 0.25 + 1 x 0.75 = 1.25 CPU time B = ICB x CPIB x Clock time B = 0.8 x ICA x 1.25 x (1.25 x Clock timeA) = 1.25 x ICA x Clock time A CPU time A = ICA x CPIA x Clock time A = ICA x 1.2 x Clock time A CPU A is faster! Inf3 Computer Architecture - 2015-2016 11 Improving CPU Performance IC: – Compiler optimizations (constant folding, constant propagation) – ISA (More complex instructions) CPI: – Microarchitecture (Pipelining, Out-of-order execution, branch prediction) – Compiler (Instruction scheduling) – ISA (Simpler instructions) Clock period: – Hardware (Smaller transistors – Moore’s law) – ISA (Simple instructions that can be easily decoded) – Microarchitecture (Simple architecture)