Memory Organization.

Slides:



Advertisements
Similar presentations
MEMORY popo.
Advertisements

M. Mateen Yaqoob The University of Lahore Spring 2014.
Chapter 12 Memory Organization
Dr. Bernard Chen Ph.D. University of Central Arkansas
Overview Memory definitions Random Access Memory (RAM)
Memory Organization.
IT Systems Memory EN230-1 Justin Champion C208 –
Data Storage Technology
Memory. When we receive some instruction or information we retain them in our memory. Similarly a computer stores the instructions for solving a problem,
Physical Memory By Gregory Marshall. MEMORY HIERARCHY.
Khaled A. Al-Utaibi Memory Devices Khaled A. Al-Utaibi
Memory Systems Architecture and Hierarchical Memory Systems
Memory Hierarchy.
CACHE MEMORY Cache memory, also called CPU memory, is random access memory (RAM) that a computer microprocessor can access more quickly than it can access.
Lecture 19 Today’s topics Types of memory Memory hierarchy.
Memory and Storage Dr. Rebhi S. Baraka
1 Memory Hierarchy The main memory occupies a central position by being able to communicate directly with the CPU and with auxiliary memory devices through.
Computer Architecture And Organization UNIT-II Structured Organization.
Computer Architecture Memory organization. Types of Memory Cache Memory Serves as a buffer for frequently accessed data Small  High Cost RAM (Main Memory)
+ CS 325: CS Hardware and Software Organization and Architecture Memory Organization.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
MEMORY ORGANIZATION - Memory hierarchy - Main memory - Auxiliary memory - Cache memory.
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.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Chapter 9 Memory Organization By Nguyen Chau Topics Hierarchical memory systems Cache memory Associative memory Cache memory with associative mapping.
Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2010
Computer operation is of how the different parts of a computer system work together to perform a task.
A memory is just like a human brain. It is used to store data and instructions. Computer memory is the storage space in computer where data is to be processed.
Jeffrey Ellak CS 147. Topics What is memory hierarchy? What are the different types of memory? What is in charge of accessing memory?
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Cache Memory.
Components of Computer. Memory Unit Most important part of the computer Used to store data and instructions that are currently in use Main memory consists.
CS 704 Advanced Computer Architecture
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Cache Memory.
Computer Organization
Memory COMPUTER ARCHITECTURE
The Goal: illusion of large, fast, cheap memory
Unit 3 THE MEMORY SYSTEM.
Ramya Kandasamy CS 147 Section 3
Memory.
How will execution time grow with SIZE?
The Central Processing Unit
Dr. Bernard Chen Ph.D. University of Central Arkansas
Cache Memory Presentation I
CS-301 Introduction to Computing Lecture 17
CACHE MEMORY.
Memory chips Memory chips have two main properties that determine their application, storage capacity (size) and access time(speed). A memory chip contains.
COMPUTER ORGANISATION AND ARCHITECTURE
MICROPROCESSOR MEMORY ORGANIZATION
Interfacing Memory Interfacing.
BIC 10503: COMPUTER ARCHITECTURE
Computer Architecture
MICROPROCESSOR MEMORY ORGANIZATION
Memory Hierarchy Memory: hierarchy of components of various speeds and capacities Hierarchy driven by cost and performance In early days Primary memory.
Chap. 12 Memory Organization
Cache Memory.
Miss Rate versus Block Size
Morgan Kaufmann Publishers Memory Hierarchy: Cache Basics
Memory Operation and Performance
If a DRAM has 512 rows and its refresh time is 9ms, what should be the frequency of row refresh operation on the average?
MICROPROCESSOR MEMORY ORGANIZATION
2.C Memory GCSE Computing Langley Park School for Boys.
Chapter 5 Computer Organization
Computer Organization & Architecture 3416
Chapter Five Large and Fast: Exploiting Memory Hierarchy
Cache - Optimization.
Cache Memory and Performance
Presentation transcript:

Memory Organization

Outline Memory Hierarchy Cache Cache performance

Memory Hierarchy The memory unit is an essential component in any digital computer since it is needed for storing programs and data Not all accumulated information is needed by the CPU at the same time Therefore, it is more economical to use low-cost storage devices to serve as a backup for storing the information that is not currently used by CPU

Memory Hierarchy Since 1980, CPU has outpaced DRAM Gap grew 50% per year

Q. How do architects address this gap? Memory Hierarchy Q. How do architects address this gap? A. Put smaller, faster “cache” memories between CPU and DRAM. Create a “memory hierarchy”.

Memory Hierarchy The memory unit that directly communicate with CPU is called the main memory Devices that provide backup storage are called auxiliary memory The memory hierarchy system consists of all storage devices employed in a computer system from the slow by high-capacity auxiliary memory to a relatively faster main memory, to an even smaller and faster cache memory

Memory Hierarchy The main memory occupies a central position by being able to communicate directly with the CPU and with auxiliary memory devices through an I/O processor A special very-high-speed memory called cache is used to increase the speed of processing by making current programs and data available to the CPU at a rapid rate

Memory Hierarchy CPU logic is usually faster than main memory access time, with the result that processing speed is limited primarily by the speed of main memory The cache is used for storing segments of programs currently being executed in the CPU and temporary data frequently needed in the present calculations The typical access time ratio between cache and main memory is about 1 to 7~10 Auxiliary memory access time is usually 1000 times that of main memory

Main Memory Most of the main memory in a general purpose computer is made up of RAM integrated circuits chips, but a portion of the memory may be constructed with ROM chips RAM– Random Access memory In tegated RAM are available in two possible operating modes, Static and Dynamic ROM– Read Only memory

Random-Access Memory (RAM) Static RAM (SRAM) Each cell stores bit with a six-transistor circuit. Retains value indefinitely, as long as it is kept powered. Relatively insensitive to disturbances such as electrical noise. Faster (8-16 times faster) and more expensive (8-16 times more expensice as well) than DRAM. Dynamic RAM (DRAM) Each cell stores bit with a capacitor and transistor. Value must be refreshed every 10-100 ms. Sensitive to disturbances. Slower and cheaper than SRAM.

SRAM vs DRAM Summary Tran. Access per bit time Persist? Sensitive? Cost Applications SRAM 6 1X Yes No 100x cache memories DRAM 1 10X No Yes 1X Main memories, frame buffers Virtually all desktop or server computers since 1975 used DRAMs for main memory and SRAMs for cache

ROM ROM is used for storing programs that are PERMENENTLY resident in the computer and for tables of constants that do not change in value once the production of the computer is completed The ROM portion of main memory is needed for storing an initial program called bootstrap loader, witch is to start the computer software operating when power is turned off

Main Memory A RAM chip is better suited for communication with the CPU if it has one or more control inputs that select the chip when needed The Block diagram of a RAM chip is shown next slide, the capacity of the memory is 128 words of 8 bits (one byte) per word

RAM

ROM

Memory Address Map Memory Address Map is a pictorial representation of assigned address space for each chip in the system To demonstrate an example, assume that a computer system needs 512 bytes of RAM and 512 bytes of ROM The RAM have 128 byte and need seven address lines, where the ROM have 512 bytes and need 9 address lines

Memory Address Map

Memory Address Map The hexadecimal address assigns a range of hexadecimal equivalent address for each chip Line 8 and 9 represent four distinct binary combination to specify which RAM we chose When line 10 is 0, CPU selects a RAM. And when it’s 1, it selects the ROM

Outline Memory Hierarchy Cache Cache performance

Cache memory If the active portions of the program and data are placed in a fast small memory, the average memory access time can be reduced, Thus reducing the total execution time of the program Such a fast small memory is referred to as cache memory The cache is the fastest component in the memory hierarchy and approaches the speed of CPU component

Cache memory When CPU needs to access memory, the cache is examined If the word is found in the cache, it is read from the fast memory If the word addressed by the CPU is not found in the cache, the main memory is accessed to read the word

Cache memory When the CPU refers to memory and finds the word in cache, it is said to produce a hit Otherwise, it is a miss The performance of cache memory is frequently measured in terms of a quantity called hit ratio Hit ratio = hit / (hit+miss)

Cache memory The basic characteristic of cache memory is its fast access time, Therefore, very little or no time must be wasted when searching the words in the cache The transformation of data from main memory to cache memory is referred to as a mapping process, there are three types of mapping: Associative mapping Direct mapping Set-associative mapping

Cache memory To help understand the mapping procedure, we have the following example:

Associative mapping The fastest and most flexible cache organization uses an associative memory The associative memory stores both the address and data of the memory word This permits any location in cache to store ant word from main memory The address value of 15 bits is shown as a five-digit octal number and its corresponding 12-bit word is shown as a four-digit octal number

Associative mapping

Associative mapping A CPU address of 15 bits is places in the argument register and the associative memory us searched for a matching address If the address is found, the corresponding 12-bits data is read and sent to the CPU If not, the main memory is accessed for the word If the cache is full, an address-data pair must be displaced to make room for a pair that is needed and not presently in the cache

Direct Mapping Associative memory is expensive compared to RAM In general case, there are 2^k words in cache memory and 2^n words in main memory (in our case, k=9, n=15) The n bit memory address is divided into two fields: k-bits for the index and n-k bits for the tag field

Direct Mapping

Direct Mapping

Set-Associative Mapping The disadvantage of direct mapping is that two words with the same index in their address but with different tag values cannot reside in cache memory at the same time Set-Associative Mapping is an improvement over the direct-mapping in that each word of cache can store two or more word of memory under the same index address

Set-Associative Mapping

Set-Associative Mapping In the slide, each index address refers to two data words and their associated tags Each tag requires six bits and each data word has 12 bits, so the word length is 2*(6+12) = 36 bits

Outline Memory Hierarchy Cache Cache performance

Cache performance Although a single cache could try to supply instruction and data, it can be a bottleneck. For example: when a load or store instruction is executed, the pipelined processor will simultaneously request both data AND instruction Hence, a single cache would present a structural hazard for loads and stores, leading to a stall

Cache performance One simple way to conquer this problem is to divide it: One cache is dedicated to instructions and another to data. Separate caches are found in most recent processors.

Average memory access time % instructions * (Hit_time + instruction miss rate*miss_penality) + % data * (Hit_time + data miss rate*miss_penality)

Average memory access time Assume 40% of the instructions are data accessing instruction. Let a hit take 1 clock cycle and the miss penalty is 100 clock cycle Assume instruction miss rate is 4% and data access miss rate is 12%, what is the average memory access time?

Average memory access time 60% * (1 + 4% * 100) + 40% * (1 + 12% * 100) = 0.6 * (5) + 0.4 * (13) = 8.2 (clock cycle)