高级计算机体系结构设计及其在数据中心和云计算的应用Lecture 2MemoryHierarchy&Caches
高级计算机体系结构设计及其在数据中心和云计算的应 用 Lecture 2 Memory Hierarchy & Caches
高级计算机体系结构设计及其在数据中心和云计算的应用This LectureMemory HierarchyCaches/SRAMCacheOrganization andOptimizations
高级计算机体系结构设计及其在数据中心和云计算的应 用 This Lecture • Memory Hierarchy • Caches / SRAM • Cache Organization and Optimizations
高级计算机体系结构设计及其在数据中心和云计算的应用Motivation100001000Processor10010Memory1198519901995200020052010Want memory to appear:AsfastasCPU As large as required by all of the running applications
高级计算机体系结构设计及其在数据中心和云计算的应 用 1 10 100 1000 10000 1985 1990 1995 2000 2005 2010 Performance Motivation • Want memory to appear: – As fast as CPU – As large as required by all of the running applications Processor Memory
高级计算机体系结构设计及其在数据中心和云计算的应用Storage HierarchyMake common casefast:-Common:temporal&spatial locality-Fast:smallermoreexpensivememoryRegistersControlledBiggerTransfersMoreBandwidthby HardwareFasterLargerCaches(SRAM)Controlledby SoftwareCheaper.(OS)Memory(DRAM)[SSD?(Flash)]Disk(Magnetic Media)WhatisS(tatic)RAMvsD(dynamic)RAM?
高级计算机体系结构设计及其在数据中心和云计算的应 用 Storage Hierarchy • Make common case fast: – Common: temporal & spatial locality – Fast: smaller more expensive memory Controlled by Hardware Controlled by Software (OS) Bigger Transfers Larger Cheaper More Bandwidth Faster Registers Caches (SRAM) Memory (DRAM) [SSD? (Flash)] Disk (Magnetic Media) What is S(tatic)RAM vs D(dynamic)RAM?
高级计算机体系结构设计及其在数据中心和云计算的应用CachesAn automatically managed hierarchyCoreBreak memory into blocks (several bytes)andtransferdatato/fromcacheinblocks$spatial localityMemoryKeep recentlyaccessed blocks-temporallocality
高级计算机体系结构设计及其在数据中心和云计算的应 用 Caches • An automatically managed hierarchy • Break memory into blocks (several bytes) and transfer data to/from cache in blocks – spatial locality • Keep recently accessed blocks – temporal locality Core $ Memory