08/29/2002CS267 Lecure 21 High Performance Programming on a Single Processor: Memory Hierarchies Katherine Yelick

Slides:



Advertisements
Similar presentations
1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Advertisements

CPE 731 Advanced Computer Architecture ILP: Part V – Multiple Issue Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University of.
CMSC 611: Advanced Computer Architecture Cache Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from.
Review: Pipelining. Pipelining Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 minutes Dryer.
Pipelining I (1) Fall 2005 Lecture 18: Pipelining I.
Pipelining Hwanmo Sung CS147 Presentation Professor Sin-Min Lee.
CS252/Patterson Lec 1.1 1/17/01 Pipelining: Its Natural! Laundry Example Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer.
Chapter Six 1.
Vector Processing. Vector Processors Combine vector operands (inputs) element by element to produce an output vector. Typical array-oriented operations.
Instruction-Level Parallelism (ILP)
Limits on ILP. Achieving Parallelism Techniques – Scoreboarding / Tomasulo’s Algorithm – Pipelining – Speculation – Branch Prediction But how much more.
1 Lecture 5: Part 1 Performance Laws: Speedup and Scalability.
01/26/05 CS267 Lecture 2a1 High Performance Programming on a Single Processor: Memory Hierarchies Matrix Multiplication Automatic Performance Tuning James.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 20 - Memory.
Computational Astrophysics: Methodology 1.Identify astrophysical problem 2.Write down corresponding equations 3.Identify numerical algorithm 4.Find a computer.
Chapter 12 Pipelining Strategies Performance Hazards.
Pipelining Andreas Klappenecker CPSC321 Computer Architecture.
CIS °The Five Classic Components of a Computer °Today’s Topics: Memory Hierarchy Cache Basics Cache Exercise (Many of this topic’s slides were.
Computer ArchitectureFall 2007 © October 22nd, 2007 Majd F. Sakr CS-447– Computer Architecture.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed, Nov 9, 2005 Topic: Caches (contd.)
331 Lec20.1Spring :332:331 Computer Architecture and Assembly Language Spring 2005 Week 13 Basics of Cache [Adapted from Dave Patterson’s UCB CS152.
Uniprocessor Optimizations and Matrix Multiplication
CS430 – Computer Architecture Introduction to Pipelined Execution
CS 61C L30 Introduction to Pipelined Execution (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Computer ArchitectureFall 2007 © November 12th, 2007 Majd F. Sakr CS-447– Computer Architecture.
1 Instant replay  The semester was split into roughly four parts. —The 1st quarter covered instruction set architectures—the connection between software.
CS1104: Computer Organisation School of Computing National University of Singapore.
Pipelining. 10/19/ Outline 5 stage pipelining Structural and Data Hazards Forwarding Branch Schemes Exceptions and Interrupts Conclusion.
Integrated Circuits Costs
EEL5708 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Pipelining.
Chapter 8 CPU and Memory: Design, Implementation, and Enhancement The Architecture of Computer Hardware and Systems Software: An Information Technology.
Super computers Parallel Processing By Lecturer: Aisha Dawood.
CS194 Lecture 31 Memory Hierarchies and Optimizations Kathy Yelick
EEL5708/Bölöni Lec 4.1 Fall 2004 September 10, 2004 Lotzi Bölöni EEL 5708 High Performance Computer Architecture Review: Memory Hierarchy.
CSE 340 Computer Architecture Summer 2014 Basic MIPS Pipelining Review.
CS.305 Computer Architecture Enhancing Performance with Pipelining Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from.
Computing Environment The computing environment rapidly evolving ‑ you need to know not only the methods, but also How and when to apply them, Which computers.
1010 Caching ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006.
1 Pipelining Part I CS What is Pipelining? Like an Automobile Assembly Line for Instructions –Each step does a little job of processing the instruction.
CSE378 Intro to caches1 Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early.
CSIE30300 Computer Architecture Unit 04: Basic MIPS Pipelining Hsin-Chou Chi [Adapted from material by and
Outline Why this subject? What is High Performance Computing?
Pipelining Example Laundry Example: Three Stages
1 Concurrent and Distributed Programming Lecture 2 Parallel architectures Performance of parallel programs References: Based on: Mark Silberstein, ,
CS252/Patterson Lec 1.1 1/17/01 معماري کامپيوتر - درس نهم pipeline برگرفته از درس : Prof. David A. Patterson.
3/12/2013Computer Engg, IIT(BHU)1 INTRODUCTION-2.
Lecture 9. MIPS Processor Design – Pipelined Processor Design #1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 14: Memory Hierarchy Chapter 5 (4.
What is it and why do we need it? Chris Ward CS147 10/16/2008.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
01/26/2009CS267 - Lecture 2 1 Experimental Study of Memory (Membench)‏ Microbenchmark for memory system performance time the following loop (repeat many.
CPE 779 Parallel Computing - Spring Memory Hierarchies & Optimizations Case Study: Tuning Matrix Multiply Based on slides by: Kathy Yelick
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Introduction to Parallel Computing: MPI, OpenMP and Hybrid Programming
Lecture 18: Pipelining I.
Performance of Single-cycle Design
5 Steps of MIPS Datapath Figure A.2, Page A-8
5.2 Eleven Advanced Optimizations of Cache Performance
Architecture Background
High Performance Programming on a Single Processor: Memory Hierarchies Matrix Multiplication Automatic Performance Tuning James Demmel
Chapter 4 The Processor Part 2
Serial versus Pipelined Execution
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
An Introduction to pipelining
Guest Lecturer TA: Shreyas Chand
Instruction Execution Cycle
Pipelining Appendix A and Chapter 3.
The University of Adelaide, School of Computer Science
Presentation transcript:

08/29/2002CS267 Lecure 21 High Performance Programming on a Single Processor: Memory Hierarchies Katherine Yelick

01/26/2004CS267 Lecure 22 Outline Goal of parallel computing Solve a problem on a parallel machine that is impractical on a serial one How long does/will the problem take on P processors? Quick look at parallel machines Understanding parallel performance Speedup: the effectiveness of parallelism Limits to parallel performance Understanding serial performance Parallelism in modern processors Memory hierarchies

01/26/2004CS267 Lecure 23 Microprocessor revolution Moore’s law in microprocessor performance made desktop computing in 2000 what supercomputing was in 1990 Massive parallelism has changed the high end From a small number of very fast (vector) processors to A large number (hundreds or thousands) of desktop processors Use the fastest “commodity” workstations as building blocks Sold in enough quantity to make them inexpensive Start with the best performance available (at a reasonable price) Today, most parallel machines are clusters of SMPs: An SMP is a tightly couple shared memory multiprocessor A cluster is a group of this connected by a high speed network

01/26/2004CS267 Lecure 24 A Parallel Computer Today: NERSC-3 Vital Statistics 5 Teraflop/s Peak Performance – 3.05 Teraflop/s with Linpack 208 nodes, 16 CPUs per node at 1.5 Gflop/s per CPU 4.5 TB of main memory 140 nodes with 16 GB each, 64 nodes with 32 GBs, and 4 nodes with 64 GBs. 40 TB total disk space 20 TB formatted shared, global, parallel, file space; 15 TB local disk for system usage Unique 512 way Double/Single switch configuration

01/26/2004CS267 Lecure 25 Performance Levels (for example on NERSC-3) Peak advertised performance (PAP): 5 Tflop/s LINPACK: 3.05 Tflop/s Gordon Bell Prize, application performance : 2.46 Tflop/s Material Science application at SC01 Average sustained applications performance: ~0.4 Tflop/s Less than 10% peak!

01/26/2004CS267 Lecure 26 Millennium and CITRIS Millennium Central Cluster 99 Dell 2300/6350/6450 Xeon Dual/Quad: 332 processors total Total: 211GB memory, 3TB disk Myrinet Mb fiber ethernet CITRIS Cluster 1: 3/2002 deployment 4 Dell Precision 730 Itanium Duals: 8 processors Total: 20 GB memory, 128GB disk Myrinet Mb copper ethernet CITRIS Cluster 2: deployment ~128 Dell McKinley class Duals: 256 processors Total: ~512GB memory, ~8TB disk Myrinet 2000 (subcluster) Mb copper ethernet ~32 nodes available now~32 nodes available now

01/26/2004CS267 Lecure 27 Outline Goal of parallel computing Solve a problem on a parallel machine that is impractical on a serial one How long does/will the problem take on P processors? Quick look at parallel machines Understanding parallel performance Speedup: the effectiveness of parallelism Limits to parallel performance Understanding serial performance Parallelism in modern processors Memory hierarchies

01/26/2004CS267 Lecure 28 Speedup The speedup of a parallel application is Speedup(p) = Time(1)/Time(p) Where Time(1) = execution time for a single processor and Time(p) = execution time using p parallel processors If Speedup(p) = p we have perfect speedup (also called linear scaling) As defined, speedup compares an application with itself on one and on p processors, but it is more useful to compare The execution time of the best serial application on 1 processor versus The execution time of best parallel algorithm on p processors

01/26/2004CS267 Lecure 29 Efficiency The parallel efficiency of an application is defined as Efficiency(p) = Speedup(p)/p Efficiency(p) <= 1 For perfect speedup Efficiency (p) = 1 We will rarely have perfect speedup. Lack of perfect parallelism in the application or algorithm Imperfect load balancing (some processors have more work) Cost of communication Cost of contention for resources, e.g., memory bus, I/O Synchronization time Understanding why an application is not scaling linearly will help finding ways improving the applications performance on parallel computers.

01/26/2004CS267 Lecure 210 Superlinear Speedup Question: can we find “superlinear” speedup, that is Speedup(p) > p ? Choosing a bad “baseline” for T(1) Old serial code has not been updated with optimizations Avoid this, and always specify what your baseline is Shrinking the problem size per processor May allow it to fit in small fast memory (cache) Application is not deterministic Amount of work varies depending on execution order Search algorithms have this characteristic

01/26/2004CS267 Lecure 211 Amdahl’s Law Suppose only part of an application runs in parallel Amdahl’s law Let s be the fraction of work done serially, So (1-s) is fraction done in parallel What is the maximum speedup for P processors? Speedup(p) = T(1)/T(p) T(p) = (1-s)*T(1)/p +s*T(1) = T(1)*((1-s) + p*s)/p Even if the parallel part speeds up perfectly, we may be limited by the sequential portion of code. Speedup(p) = p/(1 + (p-1)*s) assumes perfect speedup for parallel part

01/26/2004CS267 Lecure 212 Amdahl’s Law (for 1024 processors) Does this mean parallel computing is a hopeless enterprise? See: Gustafson, Montry, Benner, “Development of Parallel Methods for a 1024 Processor Hypercube”, SIAM J. Sci. Stat. Comp. 9, No. 4, 1988, pp.609.

01/26/2004CS267 Lecure 213 Scaled Speedup Speedup improves as the problem size grows Among other things, the Amdahl effect is smaller Consider scaling the problem size with the number of processors (add problem size parameter, n) for problem in which running time scales linearly with the problem size: T(1,n) = T(1)*n let n=p (problem size on p processors increases by p) ScaledSpeedup(p,n) = T(1,n)/T(p,n) T(p,n) = (1-s)*n*T(1,1)/p +s*T(1,1) = (1-s)*T(1,1) + s*T(1,1)=T(1,1) ScaledSpeedup(p,n) = n = p assumes serial work does not grow with n

01/26/2004CS267 Lecure 214 Scaled Efficiency Previous definition of parallel efficiency was Efficiency(p) = Speedup(p)/p We often want to scale problem size with the number of processors, but scaled speedup can be tricky Previous definition depended on a linear work in problem size May use alternate definition of efficiency that depends on a notion of throughput or rate, R(p): Floating point operations per second Transactions per second Strings matches per second Then Efficiency(p) = R(p)/(R(1)*p) May use a different problem size for R(1) and R(p)

01/26/2004CS267 Lecure 215 Three Definitions of Efficiency: Summary People use the word “efficiency” in many ways Performance relative to advertised machine peak Flop/s in application / Max Flops/s on the machine Integer, string, logical or other operations could be used, but they should be a machine-level instruction Efficiency of a fixed problem size Efficiency(p) = Speedup(p)/p Efficiency of a scaled problem size Efficiency(p) = R(p)/(R(1)*p) All of these may be useful in some context Always make it clear what you are measuring

01/26/2004CS267 Lecure 216 Scaled Speedup See: Gustafson, Montry, Benner, “Development of Parallel Methods for a 1024 Processor Hypercube”, SIAM J. Sci. Stat. Comp. 9, No. 4, 1988, pp.609.

01/26/2004CS267 Lecure 217 Limits of Scaling – an example of a current debate Test run on global climate model reported on the Earth Simulator sustained performance of about 28 TFLOPS on 640 nodes. The model was an atmospheric global climate model (T1279L96) developed originally by CCSR/NEIS and tuned by ESS. This corresponds to scaling down to a 10 km^2 grid Many physical modeling assumptions from a 200 km^2 grid don’t hold any longer The climate modeling community is debating the significance of these results

01/26/2004CS267 Lecure 218 Performance Limits insufficient memory scaled speedup fixed size speedup insufficient parallelism Log of number of processors Log of problem size

01/26/2004CS267 Lecure 219 Outline Goal of parallel computing Solve a problem on a parallel machine that is impractical on a serial one How long does/will the problem take on P processors? Quick look at parallel machines Understanding parallel performance Speedup: the effectiveness of parallelism Limits to parallel performance Understanding serial performance Parallelism in modern processors Memory hierarchies

01/26/2004CS267 Lecure 220 Principles of Parallel Computing Speedup, efficiency, and Amdahl’s Law Finding and exploiting parallelism Finding and exploiting data locality Load balancing Coordination and synchronization Performance modeling All of these things make parallel programming more difficult than sequential programming.

01/26/2004CS267 Lecure 221 Overhead of Parallelism Given enough parallel work, this is the most significant barrier to getting desired speedup. Parallelism overheads include: cost of starting a thread or process cost of communicating shared data cost of synchronizing extra (redundant) computation Each of these can be in the range of milliseconds (= millions of arithmetic ops) on some systems Tradeoff: Algorithm needs sufficiently large units of work to run fast in parallel (i.e. large granularity), but not so large that there is not enough parallel work.

01/26/2004CS267 Lecure 222 Locality and Parallelism Large memories are slower; fast memories are small. Storage hierarchies are designed to fast on average. Parallel processors, collectively, have large, fast memories -- the slow accesses to “remote” data we call “communication”. Algorithm should do most work on local data. Proc Cache L2 Cache L3 Cache Memory Conventional Storage Hierarchy Proc Cache L2 Cache L3 Cache Memory Proc Cache L2 Cache L3 Cache Memory potential interconnects

01/26/2004CS267 Lecure 223 Load Imbalance Load imbalance is the time that some processors in the system are idle due to insufficient parallelism (during that phase). unequal size tasks. Examples of the latter adapting to “interesting parts of a domain”. tree-structured computations. fundamentally unstructured problems. Algorithm needs to balance load but techniques the balance load often reduce locality

01/26/2004CS267 Lecure 224 Performance Programming is Challenging Speedup(P) = Time(1) / Time(P) Applications have “learning curves” Amber (chemical modeling)

01/26/2004CS267 Lecure 225 Outline Goal of parallel computing Solve a problem on a parallel machine that is impractical on a serial one How long does/will the problem take on P processors? Quick look at parallel machines Understanding parallel performance Speedup: the effectiveness of parallelism Limits to parallel performance Understanding serial performance Parallelism in modern processors Memory hierarchies

01/26/2004CS267 Lecure 226 Idealized Uniprocessor Model Processor names bytes, words, etc. in its address space These represent integers, floats, pointers, arrays, etc. Exist in the program stack, static region, or heap Operations include Read and write (given an address/pointer) Arithmetic and other logical operations Order specified by program Read returns the most recently written data Compiler and architecture translate high level expressions into “obvious” lower level instructions Hardware executes instructions in order specified by compiler Cost Each operations has roughly the same cost (read, write, add, multiply, etc.)

01/26/2004CS267 Lecure 227 Uniprocessors in the Real World Real processors have registers and caches small amounts of fast memory store values of recently used or nearby data different memory ops can have very different costs parallelism multiple “functional units” that can run in parallel different orders, instruction mixes have different costs pipelining a form of parallelism, like an assembly line in a factory Why is this your problem? In theory, compilers understand all of this and can optimize your program; in practice they don’t.

01/26/2004CS267 Lecure 228 What is Pipelining? In this example: Sequential execution takes 4 * 90min = 6 hours Pipelined execution takes 30+4*40+20 = 3.3 hours Pipelining helps throughput, but not latency Pipeline rate limited by slowest pipeline stage Potential speedup = Number pipe stages Time to “fill” pipeline and time to “drain” it reduces speedup ABCD 6 PM 789 TaskOrderTaskOrder Time Dave Patterson’s Laundry example: 4 people doing laundry wash (30 min) + dry (40 min) + fold (20 min)

01/26/2004CS267 Lecure 229 Example: 5 Steps of MIPS Datapath Figure 3.4, Page 134, CA:AQA 2e by Patterson and Hennessy Memory Access Write Back Instruction Fetch Instr. Decode Reg. Fetch Execute Addr. Calc ALU Memory Reg File MUX Data Memory MUX Sign Extend Zero? IF/ID ID/EX MEM/WB EX/MEM 4 Adder Next SEQ PC RD WB Data Pipelining is also used within arithmetic units – a fp multiply may have latency 10 cycles, but throughput of 1/cycle Next PC Address RS1 RS2 Imm MUX

01/26/2004CS267 Lecure 230 Limits to Instruction Level Parallelism (ILP) Limits to pipelining: Hazards prevent next instruction from executing during its designated clock cycle Structural hazards: HW cannot support this combination of instructions (single person to fold and put clothes away) Data hazards: Instruction depends on result of prior instruction still in the pipeline (missing sock) Control hazards: Caused by delay between the fetching of instructions and decisions about changes in control flow (branches and jumps). The hardware and compiler will try to reduce these: Reordering instructions, multiple issue, dynamic branch prediction, speculative execution… You can also enable parallelism by careful coding

01/26/2004CS267 Lecure 231 Dependences (Data Hazards) Limit Parallelism A dependence or data hazard is one of the following: true of flow dependence: a writes a location that b later reads (read-after write or RAW hazard) anti-dependence a reads a location that b later writes (write-after-read or WAR hazard) output dependence a writes a location that b later writes (write-after-write or WAW hazard) trueantioutput a = = aa = = aa =

01/26/2004CS267 Lecure 232 Outline Goal of parallel computing Solve a problem on a parallel machine that is impractical on a serial one How long does/will the problem take on P processors? Quick look at parallel machines Understanding parallel performance Speedup: the effectiveness of parallelism Limits to parallel performance Understanding serial performance Parallelism in modern processors Memory hierarchies

01/26/2004CS267 Lecure 233 Memory Hierarchy Most programs have a high degree of locality in their accesses spatial locality: accessing things nearby previous accesses temporal locality: reusing an item that was previously accessed Memory hierarchy tries to exploit locality on-chip cache registers datapath control processor Second level cache (SRAM) Main memory (DRAM) Secondary storage (Disk) Tertiary storage (Disk/Tape) Speed1ns10ns100ns10ms10sec SizeBKBMBGBTB

01/26/2004CS267 Lecure 234 Processor-DRAM Gap (latency) µProc 60%/yr. DRAM 7%/yr DRAM CPU 1982 Processor-Memory Performance Gap: (grows 50% / year) Performance Time “Moore’s Law” Memory hierarchies are getting deeper Processors get faster more quickly than memory

01/26/2004CS267 Lecure 235 Approaches to Handling Memory Latency Approach to address the memory latency problem Build faster memories: bandwidth has improved much more than latency Eliminate memory operations by saving values in small, fast memory and reuse them (need temporal locality) Take advantage of bandwidth by getting a chunk of memory and save it in small fast memory (need spatial locality) Take advantage of bandwidth by allowing processor to issue multiple reads to the memory system at once (requires concurrency in the instruction stream)

01/26/2004CS267 Lecure 236 Little’s Law Principle (Little's Law): the relationship of a production system in steady state is: Inventory = Throughput × Flow Time For parallel computing, this means: Required concurrency = Bandwidth x Latency Example: 1000 processor system, 1 GHz clock (1ns), 100 ns memory latency, 100 words of memory in data paths between CPU and memory at any given time. Main memory bandwidth is: ~ 1000 x 100 words x 10 9 /s = words/sec. To achieve full performance, an application needs: ~ x = 10 7 way concurrency

01/26/2004CS267 Lecure 237 Cache Basics Cache hit: in-cache memory access—cheap Cache miss: non-cached memory access—expensive Consider a tiny cache (for illustration only) Cache line length: # of bytes loaded together in one entry 2 in example Associativity direct-mapped: only 1 address (line) in a given range in cache n-way: 2 or more lines with different addresses exist Address PatternData (4 Bytes) X through X through X through X through

01/26/2004CS267 Lecure 238 Why Have Multiple Levels of Cache? On-chip vs. off-chip On-chip caches are faster, but limited in size A large cache has expenses Hardware to check addresses in cache can get expensive Associativity, which gives a more general set of data in cache, is also expensive Some examples: Cray T3E eliminated one cache to speed up misses IBM uses a level of cache as a “victim cache” which is cheaper There are other levels of the memory hierarchy Register, pages (virtual memory), … And it isn’t always a hiearchy

01/26/2004CS267 Lecure 239 Experimental Study of Memory (Membench) Microbenchmark for memory system performance time the following program for each size(A) and stride s (repeat to obtain confidence and mitigate timer resolution) for array A of size from 4KB to 8MB by 2x for stride s from 8 Bytes (1 word) to size(A)/2 by 2x for i from 0 to size by s load A[i] from memory (8 Bytes)

01/26/2004CS267 Lecure 240 Membench: What to Expect Consider the average cost per load Plot one line for each array size, time vs. stride Small stride is best: if cache line holds 4 words, at most ¼ miss If array is smaller than a given cache, all those accesses will hit (after the first run, which is negligible for large enough runs) Picture assumes only one level of cache Values have gotten more difficult to measure on modern procs s = stride average cost per access total size < L1 cache hit time memory time size > L1

01/26/2004CS267 Lecure 241 Memory Hierarchy on a Sun Ultra-2i L2: 2 MB, 12 cycles (36 ns) L1: 16 KB 2 cycles (6ns) Mem: 396 ns (132 cycles) Sun Ultra-2i, 333 MHz L2: 64 byte line 8 K pages See for details L1: 16 B line Array size

01/26/2004CS267 Lecure 242 Memory Hierarchy on a Power3 (Seaborg) Power3, 375 MHz L2: 8 MB 128 B line 9 cycles L1: 32 KB 128B line.5-2 cycles Array size Mem: 396 ns (132 cycles)

01/26/2004CS267 Lecure 243 Memory Performance on Itanium 2 (CITRIS) Itanium2, 900 MHz L2: 256 KB 128 B line.5-4 cycles L1: 32 KB 64B line.34-1 cycles Array size Mem: cycles L3: 2 MB 128 B line 3-20 cycles Uses MAPS Benchmark:

01/26/2004CS267 Lecure 244 Memory Hierarchy on a Pentium III L1: 32 byte line ? L2: 512 KB 60 ns L1: 64K 5 ns, 4-way? Katmai processor on Millennium, 550 MHz Array size

01/26/2004CS267 Lecure 245 Lessons Actual performance of a simple program can be a complicated function of the architecture Slight changes in the architecture or program change the performance significantly To write fast programs, need to consider architecture We would like simple models to help us design efficient algorithms Is this possible? We will illustrate with a common technique for improving cache performance, called blocking or tiling Idea: used divide-and-conquer to define a problem that fits in register/L1-cache/L2-cache