memory hierarchy
play

Memory Hierarchy Chapter 6 1 Outline Storage - PowerPoint PPT Presentation

The Memory Hierarchy Chapter 6 1 Outline Storage technologies and trends Locality of reference Caching in the memory hierarchy 2 Random-Access


  1. The ¡ Memory ¡ Hierarchy ¡ Chapter ¡6 ¡ 1

  2. Outline ¡ � Storage ¡technologies ¡and ¡trends ¡ � Locality ¡of ¡reference ¡ � Caching ¡in ¡the ¡memory ¡hierarchy ¡ 2

  3. Random-­‑Access ¡Memory ¡(RAM) ¡ � Key ¡features ¡ � RAM ¡is ¡tradi+onally ¡packaged ¡as ¡a ¡chip. ¡ � Basic ¡storage ¡unit ¡is ¡normally ¡a ¡cell ¡(one ¡bit ¡per ¡cell). ¡ � Mul+ple ¡RAM ¡chips ¡form ¡a ¡memory. ¡ � Sta@c ¡RAM ¡(SRAM) ¡ � Each ¡cell ¡stores ¡a ¡bit ¡with ¡a ¡four ¡or ¡six-­‑transistor ¡circuit. ¡ � Retains ¡value ¡indefinitely, ¡as ¡long ¡as ¡it ¡is ¡kept ¡powered. ¡ � Rela+vely ¡insensi+ve ¡to ¡electrical ¡noise ¡(EMI), ¡radia+on, ¡etc. ¡ � Faster ¡and ¡more ¡expensive ¡than ¡DRAM. ¡ � Dynamic ¡RAM ¡(DRAM) ¡ � Each ¡cell ¡stores ¡bit ¡with ¡a ¡capacitor. ¡One ¡transistor ¡is ¡used ¡for ¡access ¡ � Value ¡must ¡be ¡refreshed ¡every ¡10-­‑100 ¡ms. ¡ � More ¡sensi+ve ¡to ¡disturbances ¡(EMI, ¡radia+on,…) ¡than ¡SRAM. ¡ � Slower ¡and ¡cheaper ¡than ¡SRAM. ¡ 3

  4. SRAM ¡vs ¡DRAM ¡Summary ¡ Transistors Access Needs Needs per bit time refresh? EDC? Cost Applications SRAM 4 or 6 1X No Maybe 100x Cache memories DRAM 1 10X Yes Yes 1X Main memories, frame buffers 4

  5. Enhanced ¡DRAMs ¡ � Basic ¡DRAM ¡cell ¡has ¡not ¡changed ¡since ¡its ¡inven@on ¡in ¡1966. ¡ � Commercialized ¡by ¡Intel ¡in ¡1970. ¡ ¡ � DRAM ¡cores ¡with ¡beKer ¡interface ¡logic ¡and ¡faster ¡I/O ¡: ¡ � Synchronous ¡DRAM ¡(SDRAM) ¡ � Uses ¡a ¡conven+onal ¡clock ¡signal ¡instead ¡of ¡asynchronous ¡control ¡ � Allows ¡reuse ¡of ¡the ¡row ¡addresses ¡(e.g., ¡RAS, ¡CAS, ¡CAS, ¡CAS) ¡ � Double ¡data-­‑rate ¡synchronous ¡DRAM ¡(DDR ¡SDRAM) ¡ � Double ¡edge ¡clocking ¡sends ¡two ¡bits ¡per ¡cycle ¡per ¡pin ¡ � Different ¡types ¡dis+nguished ¡by ¡size ¡of ¡small ¡prefetch ¡buffer: ¡ – DDR ¡(2 ¡bits), ¡DDR2 ¡(4 ¡bits), ¡DDR4 ¡(8 ¡bits) ¡ � By ¡2010, ¡standard ¡for ¡most ¡server ¡and ¡desktop ¡systems ¡ � Intel ¡Core ¡i7 ¡supports ¡only ¡DDR3 ¡SDRAM ¡ 5

  6. anima@on ¡ Memory ¡Modules ¡ addr (row = i, col = j) : supercell (i,j) DRAM 0 64 MB memory module consisting of DRAM 7 eight 8Mx8 DRAMs bits bits bits bits bits bits bits bits 56-63 48-55 40-47 32-39 24-31 16-23 8-15 0-7 63 63 56 56 55 55 48 48 47 47 40 40 39 39 32 32 31 31 24 24 23 23 16 16 15 15 8 8 7 7 0 0 Memory controller 64-bit doubleword at main memory address A 64-bit doubleword 6

  7. Op@onal ¡Slides ¡ Conven@onal ¡DRAM ¡Organiza@on ¡ � d ¡× ¡w ¡DRAM: ¡ ¡ ¡(e.g. ¡16 ¡× ¡8 ¡= ¡128 ¡bits) ¡ Each ¡supercell ¡has ¡w ¡bits ¡(e.g., ¡w=8) ¡ Number ¡of ¡supercells ¡is ¡rows ¡× ¡cols ¡= ¡d ¡(e.g., ¡4 ¡× ¡4 ¡= ¡16) ¡ 16 x 8 DRAM chip cols 0 1 2 3 2 bits 0 / addr 1 rows Memory 2 supercell controller (2,1) (to/from CPU) 3 8 bits / data Internal row buffer 7

  8. Op@onal ¡Slides ¡ anima@on ¡ Reading ¡DRAM ¡Supercell ¡(2,1) ¡ 16 x 8 DRAM chip Cols 0 1 2 3 RAS = 2 2 0 / addr 1 Rows Memory 2 controller 3 8 / data Internal row buffer 8

  9. Op@onal ¡Slides ¡ anima@on ¡ Reading ¡DRAM ¡Supercell ¡(2,1) ¡ 16 x 8 DRAM chip Cols 0 1 2 3 CAS = 1 2 0 / addr To CPU 1 Rows Memory 2 controller supercell 3 8 (2,1) / data supercell Internal row buffer (2,1) 9

  10. Nonvola@le ¡Memories ¡ � DRAM ¡and ¡SRAM ¡are ¡vola@le ¡memories ¡ � Lose ¡informa+on ¡if ¡powered ¡off. ¡ � Nonvola@le ¡memories ¡retain ¡value ¡even ¡if ¡powered ¡off ¡ � Read-­‑only ¡memory ¡(ROM): ¡programmed ¡during ¡produc+on ¡ � Programmable ¡ROM ¡(PROM): ¡can ¡be ¡programmed ¡once ¡ � Eraseable ¡PROM ¡(EPROM): ¡can ¡be ¡bulk ¡erased ¡(UV, ¡X-­‑Ray) ¡ � Electrically ¡eraseable ¡PROM ¡(EEPROM): ¡electronic ¡erase ¡capability ¡ � Flash ¡memory: ¡EEPROMs ¡with ¡par+al ¡(sector) ¡erase ¡capability ¡ � Wears ¡out ¡aber ¡about ¡100,000 ¡erasings. ¡ ¡ � Uses ¡for ¡Nonvola@le ¡Memories ¡ � Firmware ¡programs ¡stored ¡in ¡a ¡ROM ¡(BIOS, ¡controllers ¡for ¡disks, ¡ network ¡cards, ¡graphics ¡accelerators, ¡security ¡subsystems,…) ¡ � Solid ¡state ¡disks ¡(replace ¡rota+ng ¡disks ¡in ¡thumb ¡drives, ¡smart ¡ phones, ¡mp3 ¡players, ¡tablets, ¡laptops,…) ¡ � Disk ¡caches ¡ 10

  11. Tradi@onal ¡Bus ¡Structure ¡ A ¡bus ¡is ¡a ¡collec@on ¡of ¡parallel ¡wires ¡that ¡carry ¡address, ¡ data, ¡and ¡control ¡signals. ¡ Buses ¡are ¡typically ¡shared ¡by ¡mul@ple ¡devices. ¡ CPU chip Register file ALU System bus Memory bus Main I/O Bus interface memory bridge 11

  12. Memory ¡Read ¡Transac@on ¡ The ¡CPU ¡places ¡address ¡A ¡on ¡the ¡memory ¡bus. ¡ CPU chip Register file Load operation: movq A,%rax ALU %rax Main memory 0 I/O bridge Bus interface A x 12

  13. Memory ¡Read ¡Transac@on ¡ The ¡CPU ¡places ¡address ¡A ¡on ¡the ¡memory ¡bus. ¡ CPU chip Register file Load operation: movq A,%rax ALU %rax Main memory 0 I/O bridge Addr A Bus interface A x 13

  14. Memory ¡Read ¡Transac@on ¡ Main ¡memory ¡reads ¡A ¡from ¡the ¡memory ¡bus, ¡retrieves ¡word ¡ x, ¡and ¡places ¡it ¡on ¡the ¡bus. ¡ CPU chip Register file Load operation: movq A,%rax ALU %rax Main memory X 0 I/O bridge Bus interface A x 14

  15. Memory ¡Read ¡Transac@on ¡ The ¡CPU ¡reads ¡word ¡x ¡from ¡the ¡bus ¡and ¡copies ¡it ¡into ¡ register ¡%rax. ¡ CPU chip Register file Load operation: movq A,%rax ALU X %rax Main memory 0 I/O bridge Bus interface A x 15

  16. Memory ¡Write ¡Transac@on ¡ The ¡CPU ¡places ¡address ¡A ¡on ¡bus. ¡Main ¡memory ¡reads ¡it ¡and ¡ waits ¡for ¡the ¡corresponding ¡data ¡word ¡to ¡arrive. ¡ CPU chip Register file Store operation: movq %rax,A ALU Y %rax Main memory Addr A 0 I/O bridge Bus interface A 16

  17. Memory ¡Write ¡Transac@on ¡ The ¡CPU ¡places ¡data ¡word ¡Y ¡on ¡the ¡bus. ¡ CPU chip Register file Store operation: movq %rax,A ALU Y %rax Main memory Y 0 I/O bridge Bus interface A 17

  18. Memory ¡Write ¡Transac@on ¡ Main ¡memory ¡reads ¡data ¡word ¡Y ¡ ¡from ¡the ¡bus ¡and ¡stores ¡it ¡ at ¡address ¡A. ¡ CPU chip register file Store operation: movq %rax,A ALU Y %rax main memory 0 I/O bridge bus interface Y A 18

  19. Platters What’s ¡Inside ¡A ¡Disk ¡Drive? ¡ Spindle Arm Read/Write head Actuator Electronics (including a processor SCSI and memory!) connector Image courtesy of Seagate Technology 19

  20. Disk ¡Geometry ¡ Sector Track Bits Recording Spindle Surface 20

  21. Disk ¡Geometry ¡ A ¡sector ¡is ¡a ¡sequence ¡of ¡bytes ¡(usually ¡512 ¡bytes). ¡ Each ¡track ¡consists ¡of ¡sectors ¡separated ¡by ¡gaps. ¡ Each ¡surface ¡consists ¡of ¡many ¡tracks. ¡ Disks ¡consist ¡of ¡plaKers, ¡each ¡with ¡two ¡surfaces. ¡ Tracks Surface Gaps Track k Spindle Sector 21

  22. Disk ¡Capacity ¡ Capacity: ¡maximum ¡number ¡of ¡bits ¡that ¡can ¡be ¡stored. ¡ Vendors ¡express ¡capacity ¡in ¡units ¡of ¡gigabytes ¡(GB) ¡ Note: ¡1 ¡GB ¡= ¡10 9 ¡Bytes, ¡not ¡2 30 ¡Bytes ¡ Capacity ¡is ¡determined ¡by ¡these ¡technology ¡factors: ¡ Recording ¡density ¡ ( bits/in ): ¡number ¡of ¡bits ¡that ¡can ¡be ¡squeezed ¡into ¡a ¡ 1 ¡inch ¡segment ¡of ¡a ¡track. ¡ Track ¡density ¡ ( tracks/in ): ¡number ¡of ¡tracks ¡that ¡can ¡be ¡squeezed ¡into ¡a ¡1 ¡ inch ¡radial ¡segment. ¡ Areal ¡density ¡ ( bits/in 2 ): ¡product ¡of ¡recording ¡and ¡track ¡density. ¡ 22

  23. Disk ¡Geometry ¡(Muliple-­‑PlaKer ¡View) ¡ Surface 0 Platter 0 Surface 1 Surface 2 Platter 1 Surface 3 Surface 4 Platter 2 Surface 5 Spindle 23

  24. Disk ¡Geometry ¡(Muliple-­‑PlaKer ¡View) ¡ Aligned ¡tracks ¡form ¡a ¡cylinder. ¡ Cylinder k Surface 0 Platter 0 Surface 1 Surface 2 Platter 1 Surface 3 Surface 4 Platter 2 Surface 5 Spindle 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend