编程模型 ■CPU的 Caches CPU chip register file cache cache bus system bus memory bus L2 cache memory interface memory bridge memory (DRAM) Figure 1. 8: Caches I caches: as fast as the register file a L2 caches: 5 times longer than Li caches, but faster than 5-10 times than accessing the main memory A tutor on coding, Sep 9, 2011 16
16 A tutor on coding , Sep 9, 2011 编程模型 CPU的Caches L1 caches: as fast as the register file L2 caches: 5 times longer than L1 caches, but faster than 5-10 times than accessing the main memory
编程模型 ■内存的层次结构 CPU registers hold word retrieved from cache L1: /on-chip L1 memory. cache(SRAM) L1 cache holds cache lines etrieved from memo slower, off-chip L2 cache(SRAM L2 cache holds cache lines cheaper retrieved from memory L3 maIn memory (DRAM) Main memory holds disk blocks retrieved from local disks local secondary storage local disks Local disks hold files retrieved from disks on remote network remote secondary storage servers (distributed file systems, Web servers) Figure 1.9: The memory hierarchy A tutor on coding, Sep 9, 2011
17 A tutor on coding , Sep 9, 2011 编程模型 内存的层次结构
编程模型 ■操作糸统:管理硬件 application programs ftware operating system pr。 cessor main memory lo devices hardware Figure 1. 10: Layered view of a computer system. processes virtual memory file processor main memory /o devices Figure 1.ll: Abstractions provided by an operating system A tutor on coding, Sep 9, 2011 18
18 A tutor on coding , Sep 9, 2011 编程模型 操作系统:管理硬件