版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、The Memory Hierarchy Sept 29, 2006 class10.ppt 15-213 “The course that gives CMU its Zip!” qq群发 http:/ 2 15-213, F06 Random-Access Memory (RAM) 3 15-213, F06 SRAM vs DRAM Summary Tran.Access NeedsNeeds per bit timerefresh? EDC?CostApplications SRAM4 or 61XNoMaybe100 xcache memories DRAM110XYesYes1XM
2、ain memories, frame buffers 4 15-213, F06 Conventional DRAM Organization cols rows 0123 0 1 2 3 internal row buffer 16 x 8 DRAM chip addr data supercell (2,1) 2 bits / 8 bits / memory controller (to CPU) 5 15-213, F06 Reading DRAM Supercell (2,1) cols rows RAS = 2 0123 0 1 2 internal row buffer 16 x
3、 8 DRAM chip 3 addr data 2 / 8 / memory controller 6 15-213, F06 Reading DRAM Supercell (2,1) cols rows 0123 0 1 2 3 internal row buffer 16 x 8 DRAM chip CAS = 1 addr data 2 / 8 / memory controller supercell (2,1) supercell (2,1) To CPU 7 15-213, F06 Memory Modules : supercell (i,j) 64 MB memory mod
4、ule consisting of eight 8Mx8 DRAMs addr (row = i, col = j) Memory controller DRAM 7 DRAM 0 03178151623243263394047485556 64-bit doubleword at main memory address A bits 0-7 bits 8-15 bits 16-23 bits 24-31 bits 32-39 bits 40-47 bits 48-55 bits 56-63 64-bit doubleword 03178151623243263394047485556 64-
5、bit doubleword at main memory address A 8 15-213, F06 Enhanced DRAMs 9 15-213, F06 Nonvolatile Memories 10 15-213, F06 Traditional Bus Structure Connecting CPU and Memory main memory I/O bridge bus interface ALU register file CPU chip system busmemory bus 11 15-213, F06 Memory Read Transaction (1) A
6、LU register file bus interface A 0 Ax main memory I/O bridge %eax Load operation: movl A, %eax 12 15-213, F06 Memory Read Transaction (2) ALU register file bus interface x 0 Ax main memory %eax I/O bridge Load operation: movl A, %eax 13 15-213, F06 Memory Read Transaction (3) x ALU register file bus
7、 interface x main memory 0 A %eax I/O bridge Load operation: movl A, %eax 14 15-213, F06 Memory Write Transaction (1) y ALU register file bus interface A main memory 0 A %eax I/O bridge Store operation: movl %eax, A 15 15-213, F06 Memory Write Transaction (2) y ALU register file bus interface y main
8、 memory 0 A %eax I/O bridge Store operation: movl %eax, A 16 15-213, F06 Memory Write Transaction (3) y ALU register file bus interface y main memory 0 A %eax I/O bridge Store operation: movl %eax, A 17 15-213, F06 Memory Subsystem Trends 18 15-213, F06 Disk Geometry spindle surface tracks track k s
9、ectors gaps 19 15-213, F06 Disk Geometry (Muliple-Platter View) surface 0 surface 1 surface 2 surface 3 surface 4 surface 5 cylinder k spindle platter 0 platter 1 platter 2 20 15-213, F06 Disk Capacity 21 15-213, F06 Computing Disk Capacity 22 15-213, F06 Disk Operation (Single-Platter View) The dis
10、k surface spins at a fixed rotational rate spindle By moving radially, the arm can position the read/write head over any track. The read/write head is attached to the end of the arm and flies over the disk surface on a thin cushion of air. spindle spindle spindle spindle 23 15-213, F06 Disk Operatio
11、n (Multi-Platter View) arm read/write heads move in unison from cylinder to cylinder spindle 24 15-213, F06 Disk Access Time 25 15-213, F06 Disk Access Time Example 26 15-213, F06 Logical Disk Blocks 27 15-213, F06 I/O Bus main memory I/O bridge bus interface ALU register file CPU chip system busmem
12、ory bus disk controller graphics adapter USB controller mousekeyboardmonitor disk I/O bus Expansion slots for other devices such as network adapters. 28 15-213, F06 Reading a Disk Sector (1) main memory ALU register file CPU chip disk controller graphics adapter USB controller mousekeyboardmonitor d
13、isk I/O bus bus interface CPU initiates a disk read by writing a command, logical block number, and destination memory address to a port (address) associated with disk controller. 29 15-213, F06 Reading a Disk Sector (2) main memory ALU register file CPU chip disk controller graphics adapter USB con
14、troller mousekeyboardmonitor disk I/O bus bus interface Disk controller reads the sector and performs a direct memory access (DMA) transfer into main memory. 30 15-213, F06 Reading a Disk Sector (3) main memory ALU register file CPU chip disk controller graphics adapter USB controller mousekeyboardm
15、onitor disk I/O bus bus interface When the DMA transfer completes, the disk controller notifies the CPU with an interrupt (i.e., asserts a special “interrupt” pin on the CPU) 31 15-213, F06 Storage Trends metric1980198519901995200020052005:1980 $/MB8,0008801003010.2040,000 access (ns)375200100706050
16、8 typical size(MB) 0.0640.256416641,00015,000 DRAM metric1980198519901995200020052005:1980 $/MB19,2002,90032025610075256 access (ns)3001503515121030 SRAM metric1980198519901995200020052005:1980 $/MB50010080.300.050.00110,000 access (ms)877528108422 typical size(MB) 1101601,0009,000400,000 400,000 Di
17、sk 32 15-213, F06 CPU Clock Rates 1980198519901995200020052005:1980 processor 8080286386Pentium P-IIIP-4 clock rate(MHz) 16201507503,0003,000 cycle time(ns)1,0001665061.30.33,333 33 15-213, F06 The CPU-Memory Gap 34 15-213, F06 Locality Locality Example: Data Reference array elements in succession (
18、stride-1 reference pattern): Reference sum each iteration: Instructions Reference instructions in sequence: Cycle through loop repeatedly: sum = 0; for (i = 0; i n; i+) sum += ai; return sum; Spatial locality Spatial locality Temporal locality Temporal locality 35 15-213, F06 Locality Example int su
19、m_array_rows(int aMN) int i, j, sum = 0; for (i = 0; i M; i+) for (j = 0; j N; j+) sum += aij; return sum; 36 15-213, F06 Locality Example int sum_array_cols(int aMN) int i, j, sum = 0; for (j = 0; j N; j+) for (i = 0; i M; i+) sum += aij; return sum; 37 15-213, F06 Locality Example int sum_array_3d
20、(int aMNN) int i, j, k, sum = 0; for (i = 0; i M; i+) for (j = 0; j N; j+) for (k = 0; k N; k+) sum += akij; return sum; 38 15-213, F06 Memory Hierarchies 39 15-213, F06 An Example Memory Hierarchy registers on-chip L1 cache (SRAM) main memory (DRAM) local secondary storage (local disks) Larger, slo
21、wer, and cheaper (per byte) storage devices remote secondary storage (tapes, distributed file systems, Web servers) Local disks hold files retrieved from disks on remote network servers. Main memory holds disk blocks retrieved from local disks. off-chip L2 cache (SRAM) L1 cache holds cache lines ret
22、rieved from the L2 cache memory. CPU registers hold words retrieved from L1 cache. L2 cache holds cache lines retrieved from main memory. L0: L1: L2: L3: L4: L5: Smaller, faster, and costlier (per byte) storage devices 40 15-213, F06 Caches 41 15-213, F06 Caching in a Memory Hierarchy 0123 4567 8910
23、11 12131415 Larger, slower, cheaper storage device at level k+1 is partitioned into blocks. Data is copied between levels in block-sized transfer units 89143 Smaller, faster, more expensive device at level k caches a subset of the blocks from level k+1 Level k: Level k+1: 4 4 410 10 10 42 15-213, F06 Request 14 Request 12 General Cac
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025 网络基础之网络物联网安全态势感知标准课件
- 2024-2025学年公务员考试《常识》综合练习试卷(含答案详解)
- 2024-2025学年度刑法期末考试模考模拟试题附答案详解【完整版】
- 2025年医学伦理学考试题及答案
- 2024-2025学年公务员考试《常识》模拟试题带答案详解(新)
- 2024-2025学年度医学检验(士)常考点试卷【模拟题】附答案详解
- 2026年比亚迪硫化物固态电池研发进展与快充突破
- 2024-2025学年度贵州工商职业学院妇产护理期末高频难、易错点题附完整答案详解【有一套】
- 2024-2025学年反射疗法师3级模拟试题含答案详解(培优B卷)
- 2024-2025学年度反射疗法师3级全真模拟模拟题(轻巧夺冠)附答案详解
- 薪资核定及管理办法
- 劳动课自制沙拉课件
- 药膳养生鸡汤培训课件
- 监狱辅警面试题目及答案
- 十五五特殊教育发展提升行动计划
- 医院运营数据统计分析
- 幼儿跑酷培训
- 2025至2030年中国氟化液行业市场运行态势及产业趋势研判报告
- 毕业设计(论文)-包裹分拣机械结构设计
- 徐州地铁考试题库及答案
- 国家助学贷款诚信教育主题班会
评论
0/150
提交评论