Documente Academic
Documente Profesional
Documente Cultură
Chapter 7 - Memory
Chapter 7 Memory
7-2
Chapter 7 - Memory
Chapter Contents
7.1 The Memory Hierarchy 7.2 Random-Access Memory 7.3 Memory Chip Organization 7.4 Case Study: Rambus Memory 7.5 Cache Memory 7.6 Virtual Memory 7.7 Advanced Topics 7.8 Case Study: Associative Memory in Routers 7.9 Case Study: The Intel Pentium 4 Memory System
7-3
Chapter 7 - Memory
7-4
Chapter 7 - Memory
7-5
Chapter 7 - Memory
7-6
Chapter 7 - Memory
7-7
Chapter 7 - Memory
7-8
Chapter 7 - Memory
7-9
Chapter 7 - Memory
Two Four-Word by Four-Bit RAMs are Used in Creating a Four-Word by Eight-Bit RAM
7-10
Chapter 7 - Memory
7-11
Chapter 7 - Memory
7-12
Chapter 7 - Memory
7-13
Chapter 7 - Memory
7-14
Chapter 7 - Memory
7-15
Chapter 7 - Memory
Flash Memory
(a) External view of ash memory module and (b) ash module internals. (Source: adapted from HowStuffWorks.com.)
Computer Architecture and Organization by M. Murdocca and V. Heuring
2007 M. Murdocca and V. Heuring
7-16
Chapter 7 - Memory
Current ows from source to drain when a sufcient negative charge is placed on the dielectric material, preventing current ow through the word line. This is the logical 0 state. When the dielectric material is not charged, current ows between the bit and word lines, which is the logical 1 state.
Computer Architecture and Organization by M. Murdocca and V. Heuring
2007 M. Murdocca and V. Heuring
7-17
Chapter 7 - Memory
Rambus Memory
Comparison of DRAM and RDRAM congurations.
7-18
Chapter 7 - Memory
Rambus Memory
Rambus technology on the Nintendo 64 motherboard (left) enables cost savings over the conventional Sega Saturn motherboard design (right).
7-19
Chapter 7 - Memory
The locality principle: a recently referenced memory location is likely to be referenced again (temporal locality); a neighbor of a recently referenced memory location is likely to be referenced (spatial locality).
Computer Architecture and Organization by M. Murdocca and V. Heuring
2007 M. Murdocca and V. Heuring
7-20
Chapter 7 - Memory
7-21
Chapter 7 - Memory
If the addressed word is in the cache, it will be found in word (14)16 of a slot that has tag (501AF80)16, which is made up of the 27 most signicant bits of the address. If the addressed word is not in the cache, then the block corresponding to tag eld (501AF80)16 is brought into an available slot in the cache from the main memory, and the memory reference is then satised from the cache.
7-22
Chapter 7 - Memory
7-23
Chapter 7 - Memory
Replacement 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/rst-out (FIFO) Least frequently used (LFU) Random Optimal (used for analysis only look backward in time and reverseengineer the best possible strategy for a particular sequence of memory references.)
Computer Architecture and Organization by M. Murdocca and V. Heuring
2007 M. Murdocca and V. Heuring
7-24
Chapter 7 - Memory
7-25
Chapter 7 - Memory
If the addressed word is in the cache, it will be found in word (14)16 of slot (2F80)16, which will have a tag of (1406)16.
7-26
Chapter 7 - Memory
7-27
Chapter 7 - Memory
7-28
Chapter 7 - Memory
The leftmost 14 bits form the tag eld, followed by 13 bits for the set eld, followed by ve bits for the word eld:
7-29
Chapter 7 - Memory
7-30
Chapter 7 - Memory
7-31
Chapter 7 - Memory
7-32
Chapter 7 - Memory
7-33
Chapter 7 - Memory
7-34
Chapter 7 - Memory
Calculation of Hit Ratio and Effective Access Time for Example Program
7-35
Chapter 7 - Memory
H1 is the ratio of the number of times the accessed word is in the L1 cache to the total number of memory accesses. There are a total of 85 (L1) and 15 (L2) misses, and so:
7-36
Chapter 7 - Memory
7-37
Chapter 7 - Memory
7-38
Chapter 7 - Memory
Cache Coherency
The goal of cache coherence is to ensure that every cache sees the same value for a referenced location, which means making sure that any shared operand that is changed is updated throughout the system. This brings us to the issue of false sharing, which reduces cache performance when two operands that are not shared between processes share the same cache line. The situation is shown below. The problem is that each process will invalidate the others cache line when writing data without a real need, unless the compiler prevents this.
7-39
Chapter 7 - Memory
Overlays
A partition graph for a program with a main routine and three subroutines:
7-40
Chapter 7 - Memory
Virtual Memory
Virtual memory is stored in a hard disk image. The physical memory holds a small number of virtual pages in physical page frames. A mapping between a virtual and a physical memory:
7-41
Chapter 7 - Memory
Page Table
The page table maps between virtual memory and physical memory.
7-42
Chapter 7 - Memory
7-43
Chapter 7 - Memory
The conguration of a page table changes as a program executes. Initially, the page table is empty. In the nal conguration, four pages are in physical memory.
7-44
Chapter 7 - Memory
Segmentation
A segmented memory allows two users to share the same word processor code, with different data spaces:
7-45
Chapter 7 - Memory
Fragmentation
(a) Free area of memory after initialization; (b) after fragmentation; (c) after coalescing.
7-46
Chapter 7 - Memory
7-47
Chapter 7 - Memory
7-48
Chapter 7 - Memory
7-49
Chapter 7 - Memory
Overview of CAM
Source: (Foster, C. C., Content Addressable Parallel Processors, Van Nostrand Reinhold Company, 1976.)
7-50
Chapter 7 - Memory
7-51
Chapter 7 - Memory
The use of associative memories in high-end routers reduces the lookup time by allowing a search to be performed in a single operation. The search is based on the destination address, rather than the physical memory address. Access methods for this memory have been standardized into an interface interoperability agreement by the Network Processing Forum.
Computer Architecture and Organization by M. Murdocca and V. Heuring
2007 M. Murdocca and V. Heuring
7-52
Chapter 7 - Memory
7-53
Chapter 7 - Memory