ITEC 352 Lecture 25 Memory(2). Review RAM –Why it isnt on the CPU –What it is made of –Building blocks to black boxes –How it is accessed –Problems with.

Slides:



Advertisements
Similar presentations
SE-292 High Performance Computing
Advertisements

MEMORY popo.
Page Table Implementation
Cache and Virtual Memory Replacement Algorithms
361 Computer Architecture Lecture 15: Cache Memory
Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a cache for secondary (disk) storage – Managed jointly.
SE-292 High Performance Computing
SE-292 High Performance Computing Memory Hierarchy R. Govindarajan
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 23, 2002 Topic: Memory Hierarchy Design (HP3 Ch. 5) (Caches, Main Memory and.
1 Cache and Caching David Sands CS 147 Spring 08 Dr. Sin-Min Lee.
Lecture 8: Memory Hierarchy Cache Performance Kai Bu
ITEC 352 Lecture 25 Memory(3). Review Questions RAM –What is the difference between register memory, cache memory, and main memory? –What connects the.
Performance of Cache Memory
Cache Here we focus on cache improvements to support at least 1 instruction fetch and at least 1 data access per cycle – With a superscalar, we might need.
ITEC 352 Lecture 27 Memory(4). Review Questions? Cache control –L1/L2  Main memory example –Formulas for hits.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
Cache Memory Locality of reference: It is observed that when a program refers to memory, the access to memory for data as well as code are confined to.
On-Chip Cache Analysis A Parameterized Cache Implementation for a System-on-Chip RISC CPU.
7-1 Chapter 7 - Memory Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture and.
CSCE 212 Chapter 7 Memory Hierarchy Instructor: Jason D. Bakos.
Associative Cache Mapping A main memory block can load into any line of cache Memory address is interpreted as tag and word (or sub-address in line) Tag.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
ITEC 352 Lecture 24 Memory. Review Questions? Reminder: HW due on Wed. Night Intel 8080 CPU.
CSNB123 coMPUTER oRGANIZATION
7-1 Chapter 7 - Memory Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer Architecture.
7-1 Chapter 7 - Memory Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of Computer Architecture Miles.
Memory Hierarchy and Cache Memory Jennifer Tsay CS 147 Section 3 October 8, 2009.
IT253: Computer Organization
Chapter Twelve Memory Organization
CS1104 – Computer Organization PART 2: Computer Architecture Lecture 10 Memory Hierarchy.
Computer Architecture Memory organization. Types of Memory Cache Memory Serves as a buffer for frequently accessed data Small  High Cost RAM (Main Memory)
2007 Sept. 14SYSC 2001* - Fall SYSC2001-Ch4.ppt1 Chapter 4 Cache Memory 4.1 Memory system 4.2 Cache principles 4.3 Cache design 4.4 Examples.
CSE 241 Computer Engineering (1) هندسة الحاسبات (1) Lecture #3 Ch. 6 Memory System Design Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Caches Where is a block placed in a cache? –Three possible answers  three different types AnywhereFully associativeOnly into one block Direct mappedInto.
Lecture#15. Cache Function The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Cosc 2150: Computer Organization
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
Computer Organization CS224 Fall 2012 Lessons 41 & 42.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
EEC4133 Computer Organization & Architecture Chapter 7: Memory by Muhazam Mustapha, April 2014.
1  1998 Morgan Kaufmann Publishers Chapter Seven.
Additional Cache Notes Dan Nguyen Spring Lee.
What is it and why do we need it? Chris Ward CS147 10/16/2008.
Cache Small amount of fast memory Sits between normal main memory and CPU May be located on CPU chip or module.
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics Organisation.
1 Memory Hierarchy Design Chapter 5. 2 Cache Systems CPUCache Main Memory Data object transfer Block transfer CPU 400MHz Main Memory 10MHz Bus 66MHz CPU.
Memory Hierarchy and Cache. A Mystery… Memory Main memory = RAM : Random Access Memory – Read/write – Multiple flavors – DDR SDRAM most common 64 bit.
Associative Mapping A main memory block can load into any line of cache Memory address is interpreted as tag and word Tag uniquely identifies block of.
CS161 – Design and Architecture of Computer
CS161 – Design and Architecture of Computer
The Goal: illusion of large, fast, cheap memory
Associativity in Caches Lecture 25
Cache Memory Presentation I
Chapter 5 Memory CSE 820.
ECE 445 – Computer Organization
Chapter 6 Memory System Design
Chap. 12 Memory Organization
Morgan Kaufmann Publishers
Memory Organization.
Chapter Contents 7.1 The Memory Hierarchy 7.2 Random Access Memory
Overview Problem Solution CPU vs Memory performance imbalance
Presentation transcript:

ITEC 352 Lecture 25 Memory(2)

Review RAM –Why it isnt on the CPU –What it is made of –Building blocks to black boxes –How it is accessed –Problems with decoders –Row / Column solution

Memory (2) Objectives ROM Cache memory

Memory (2) Other elements We will look briefly at one more memory element: ROM (Read only memory) For the other memory: cache, and virtual memory – we will look at the main concepts but not at the hardware details.

Memory (2) Read Only Memory Good news: we do not need any Flip flops to develop ROM. Why not? You can think of a ROM as a hard-coded memory, i.e., memory that cannot be changed. However, these days ROMs are being replaced by special chips that load a software called firmware.

Memory (2) A ROM that Stores Four Four-Bit Words (the two fours in the title are not typos!)

Memory (2) Cache Cache is a small memory area that is faster to access than main memory (RAM). The speed is due to two reasons: (a) It is connected to the CPU either by a faster bus (or) it may be present on the CPU. E.g., L1/L2 caches on chip. (b) It stores data that have been most recently used (or) most often used – hence lookups for such data is fast.

Memory (2) Cache Placement –Cache improves memory access to the data stored in the cache. Here you can see that the cache can be accessed by a 400 MHz bus vs. main memory which is accessible using a 66 Mhz bus. –Mhz: Mega hertz or million clock cycles per second. E.g., 400 Mhz is 400 million clock cycles per second. Which is faster 400 Mhz or 66 Mhz? Hypothetical case: We are up to 1600mhz on current cpus

Memory (2) Speed of a cache How can we make the cache more effective: (Brainstorm and think of all the ways that we can improve performance of our programs when using a cache).

Memory (2) Speed of a cache (2) Key factors effecting speed: (a) Speed of the data bus from CPU to cache. (b) Determining what data must be stored in the cache. (a) Strategies to use if the the cache is full – how can we add new informatin to the cache? This is the cache replacement policy. What data do you think should be stored in the cache?

Memory (2) Replacemen t Policies – When there are no available slots in which to place a block, a replacement policy is implemented. The replacement policy governs the choice of which slot is freed up for the new block. – Replacement policies are used for associative and set-associative mapping schemes, and also for virtual memory. – Least recently used (LRU) – First-in/first-out (FIFO) – Least frequently used (LFU) – Random – Optimal (used for analysis only – look backward in time and reverse- engineer the best possible strategy for a particular sequence of memory references.)

Memory (2) Data missing? We have specific cache read and write policies.

Memory (2) Read / Write Policies

Memory (2) Performanc e Next: We use hit ratios to measure cache performance….

Memory (2) Performanc e of a cache Assume a program (instructions) is loaded into the memory from address 0 to 57. Also assume: cache access time: 80 ns and memory access time: 2500 ns. What is the performance when using a cache Memory address range Memory Cache

Memory (2) Performanc e of a cache What is the memory address of the first instruction accessed? –Address: 0 Is this in the cache? –Initially, cache is empty. Hence, no! So what do you do? –Depends on the policy Memory address range Memory Cache

Memory (2) Performanc e of a cache As the data is not in the cache, the block 0-16 is loaded into the slot1 of the cache. The next instruction is at address 1. –Is this in the cache? –Yes – so the next 15 instructions are in the cache Memory address range Memory Cache

Memory (2) Performanc e of cache Hence: EventLocation Time 1 miss ns 15 hits ns X 15 …

Memory (2) Hit Ratios and Effective Access Times Hit ratio and effective access time for single level cache: Hit ratios and effective access time for multi-level cache:

Memory (2) Multilevel caches As size of ICs have increased, packing density also has increased. –Multilevel caches have been developed Fastest level L1 is on the chip. –Usually data and instructions are kept separate on this cache. Called split cache. Level L2 and L3 are slower than L1 and are unified caches.

Memory (2) Question Lets say there are memory references to execute a process. –90 cause L1 misses and of these 10 cause L2 misses. –Let L1 hit time: 5 ns (this is the time to access a memory location if it is in the cache). –Let L2 hit time: 20 ns –Let the L2 miss time: 100 ns (time to access memory in the main memory). What is the effective access time to access a memory?

Memory (2) Summary so far … We have seen different types of memory elements and gone up the hierarchy of memory. –We have developed RAM, ROM, Registers and looked at Caches. Next: we will see how programs that we develop are allocated memory. Some terminology: –Process: any program in execution is called a process. E.g., A java program that you write is simply a program, unless you execute it. During its execution it becomes a process. There can be multiple processes of the same program.

Memory (2) Summary Cache access