NEXT SET OF SLIDES FROM DENNIS FREY S FALL 2011 CMSC313.

Size: px
Start display at page:

Download "NEXT SET OF SLIDES FROM DENNIS FREY S FALL 2011 CMSC313."

Transcription

1 NEXT SET OF SLIDES FROM DENNIS FREY S FALL 211 CMSC313

2 The Memory Hierarchy " Topics" Storage technologies and trends" Locality of reference" Caching in the memory hierarchy"

3 Random-Access Memory (RAM)" Key features" RAM is packaged as a chip." Basic storage unit is a cell (one bit per cell)." Multiple RAM chips form a memory." Static RAM (SRAM)" Each cell stores bit with a six-transistor circuit." Retains value indefinitely, as long as it is kept powered." Relatively insensitive to disturbances such as electrical noise." Faster and more expensive than DRAM." Dynamic RAM (DRAM)" Each cell stores bit with a capacitor and transistor." Value must be refreshed every 1-1 ms." Sensitive to disturbances." Slower and cheaper than SRAM." 2 " CMSC313-F 9"

4 Conventional DRAM Organization" d x w DRAM:" dw total bits organized as d supercells of size w bits" 16 x 8 DRAM chip" cols" " 1" 2" 3" (to CPU)" memory" controller" 2 bits" /" addr 8 bits" /" data " 1" rows" 2" 3" supercell" (2,1)" 3 " internal row buffer" CMSC313-F 9"

5 Reading DRAM Supercell (2,1)" Step 1(a): Row access strobe (RAS) selects row 2." Step 1(b): Row 2 copied from DRAM array to row buffer." 16 x 8 DRAM chip" memory" controller" RAS = 2 2" /" addr " 1" rows" 2" cols" " 1" 2" 3" 8" /" data 3" 4 " internal row buffer" CMSC313-F 9"

6 Reading DRAM Supercell (2,1)" Step 2(a): Column access strobe (CAS) selects column 1." Step 2(b): Supercell (2,1) copied from buffer to data lines, and eventually back to the CPU." 16 x 8 DRAM chip" To CPU" memory" controller" CAS = 1 2" /" addr " 1" rows" 2" cols" " 1" 2" 3" supercell " (2,1)" 8" /" data 3" supercell " 5 " internal row buffer" (2,1)" CMSC313-F 9"

7 Memory Modules" addr (row = i, col = j) DRAM 7" DRAM " : supercell (i,j)" 64 MB " memory module" consisting of" eight 8Mx8 DRAMs" bits" bits" 56-63" 48-55" bits" 4-47" bits" 32-39" bits" 24-31" bits" 16-23" bits" 8-15" bits" -7" 63" 56" 55" 48"47" 4" 39" 32" 31" 24"23" 16"15" 8" 7" " 64-bit doubleword at main memory address A! Memory" controller" 64-bit doubleword" 6 " CMSC313-F 9"

8 Nonvolatile Memories" DRAM and SRAM are volatile memories" Lose information if powered off." Nonvolatile memories retain value even if powered off." Generic name is read-only memory (ROM)." Misleading because some ROMs can be read and modified." Types of ROMs" Programmable ROM (PROM)" Eraseable programmable ROM (EPROM)" Electrically eraseable PROM (EEPROM)" Flash memory" Firmware" " Program stored in a ROM" Boot time code, BIOS (basic input/ouput system)" graphics cards, disk controllers." 7 " CMSC313-F 9"

9 Typical Bus Structure Connecting CPU and Memory" A bus is a collection of parallel wires that carry address, data, and control signals." Buses are typically shared by multiple devices." CPU chip" register file" ALU" system bus" memory bus" bus interface" I/O " bridge" main" memory" 8 " CMSC313-F 9"

10 Memory Read Transaction (1)" CPU places address A on the memory bus." %eax" register file" ALU" Load operation: movl A, %eax! " bus interface" I/O bridge" " " A! main memory" " x" A" 9 " CMSC313-F 9"

11 Memory Read Transaction (2)" Main memory reads A from the memory bus, retrieves word x, and places it on the bus." %eax" register file" ALU" Load operation: movl A, %eax! " I/O bridge" main memory" x! " bus interface" x" A" 1 " CMSC313-F 9"

12 Memory Read Transaction (3)" CPU reads word x from the bus and copies it into register %eax." %eax" register file" x" ALU" Load operation: movl A, %eax! " I/O bridge" main memory" " bus interface" x" A" 11 " CMSC313-F 9"

13 Memory Write Transaction (1)" CPU places address A on bus. Main memory reads it and waits for the corresponding data word to arrive." %eax" register file" y" ALU" Store operation: movl %eax, A! " bus interface" I/O bridge" A! main memory" " A" 12 " CMSC313-F 9"

14 Memory Write Transaction (2)" CPU places data word y on the bus." %eax" register file" y" ALU" Store operation: movl %eax, A! " bus interface" I/O bridge" y! main memory" " A" 13 " CMSC313-F 9"

15 Memory Write Transaction (3)" Main memory reads data word y from the bus and stores it at address A." %eax" register file" y" ALU" Store operation: movl %eax, A! " I/O bridge" main memory" " bus interface" y" A" 14 " CMSC313-F 9"

16 Disk Geometry" Disks consist of platters, each with two surfaces." Each surface consists of concentric rings called tracks." Each track consists of sectors separated by gaps." tracks" surface" track k! gaps" spindle" sectors" 15 " CMSC313-F 9"

17 Disk Geometry (Muliple-Platter View)" Aligned tracks form a cylinder." cylinder k surface " surface 1" surface 2" surface 3" surface 4" surface 5" platter " platter 1" platter 2" spindle" 16 " CMSC313-F 9"

18 Disk Capacity" Capacity: maximum number of bits that can be stored." Vendors express capacity in units of gigabytes (GB), where 1 GB = 1^9 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." Modern disks partition tracks into disjoint subsets called recording zones "" Each track in a zone has the same number of sectors, determined by the circumference of innermost track." Each zone has a different number of sectors/track " " "" 17 " CMSC313-F 9"

19 Computing Disk Capacity" Capacity = "(# bytes/sector) x (avg. # sectors/track) x" " " "(# tracks/surface) x (# surfaces/platter) x" " " "(# platters/disk)" Example:" 512 bytes/sector" 3 sectors/track (on average)" 2, tracks/surface" 2 surfaces/platter" 5 platters/disk" Capacity = 512 x 3 x 2 x 2 x 5" " " = 3,72,," = 3.72 GB " 18 " CMSC313-F 9"

20 Disk Operation (Single-Platter View)" " The disk surface " spins at a fixed" rotational rate" 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" By moving radially, the arm can position the read/write head over any track." 19 " CMSC313-F 9"

21 Disk Operation (Multi-Platter View)" " read/write heads " move in unison" from cylinder to cylinder" arm" spindle" 2 " CMSC313-F 9"

22 Disk Access Time" Average time to access some target sector approximated by :" T access = T avg seek + T avg rotation + T avg transfer " Seek time (T avg seek )" Time to position heads over cylinder containing target sector." Typical T avg seek = 9 ms" Rotational latency (T avg rotation )" Time waiting for first bit of target sector to pass under read/write head." T avg rotation = 1/2 x 1/RPMs x 6 sec/1 min" Transfer time (T avg transfer )"" Time to read the bits in the target sector." T avg transfer = 1/RPM x 1/(avg # sectors/track) x 6 secs/1 min." 21 " CMSC313-F 9"

23 Disk Access Time Example" Given:" Rotational rate = 7,2 RPM" Average seek time = 9 ms." Avg # sectors/track = 4." Derived:" Tavg rotation = 1/2 x (6 secs/72 RPM) x 1 ms/sec = 4 ms." Tavg transfer = 6/72 RPM x 1/4 secs/track x 1 ms/sec =.2 ms" Taccess = 9 ms + 4 ms +.2 ms" Important points:" Access time dominated by seek time and rotational latency." First bit in a sector is the most expensive, the rest are free." SRAM access time is about 4 ns/doubleword, DRAM about 6 ns" Disk is about 4, times slower than SRAM, " 2,5 times slower then DRAM." 22 " CMSC313-F 9"

24 Logical Disk Blocks" Modern disks present a simpler abstract view of the complex sector geometry:" The set of available sectors is modeled as a sequence of b- sized logical blocks (, 1, 2,...)" Mapping between logical blocks and actual (physical) sectors" Maintained by hardware/firmware device called disk controller." Converts requests for logical blocks into (surface,track,sector) triples." Allows controller to set aside spare cylinders for each zone." Accounts for the difference in formatted capacity and maximum capacity. " " 23 " CMSC313-F 9"

25 I/O Bus" CPU chip" register file" ALU" system bus" memory bus" bus interface" I/O " bridge" main" memory" USB" controller" graphics" adapter" I/O bus" disk " controller" Expansion slots for" other devices such" as network adapters." " mouse"keyboard" monitor" disk" 24 " CMSC313-F 9"

26 Reading a Disk Sector (1)" CPU chip" " register file" ALU" CPU initiates a disk read by writing a command, logical block number, and destination memory address to a port (address) associated with disk controller." bus interface" main" memory" I/O bus" USB" controller" graphics" adapter" disk " controller" mouse"keyboard" monitor" disk" 25 " CMSC313-F 9"

27 Reading a Disk Sector (2)" CPU chip" register file" ALU" Disk controller reads the sector and performs a direct memory access (DMA) transfer into main memory." bus interface" main" memory" I/O bus" USB" controller" graphics" adapter" disk " controller" mouse"keyboard" monitor" disk" 26 " CMSC313-F 9"

28 Reading a Disk Sector (3)" CPU chip" register file" ALU" When the DMA transfer completes, the disk controller notifies the CPU with an interrupt (i.e., asserts a special interrupt pin on the CPU)" bus interface" main" memory" I/O bus" USB" controller" graphics" adapter" disk " controller" mouse"keyboard" monitor" disk" 27 " CMSC313-F 9"

29 Locality" Principle of Locality:" Programs tend to reuse data and instructions near those they have used recently, or that were recently referenced themselves." Temporal locality: Recently referenced items are likely to be referenced in the near future." Spatial locality: Items with nearby addresses tend to be referenced close together in time." Locality Example:" Data" Reference array elements in succession (stride-1 reference pattern):" Spatial locality" Reference sum each iteration:" Temporal locality" Instructions" Reference instructions in sequence:" Spatial locality" Cycle through loop repeatedly: " Temporal locality" sum = ; for (i = ; i < n; i++) sum += a[i]; return sum; 28 " CMSC313-F 9"

30 Locality Example" Claim: Being able to look at code and get a qualitative sense of its locality is a key skill for a professional programmer." " Question: Does this function have good locality?" int sumarrayrows(int a[m][n]) { int i, j, sum = ; } for (i = ; i < M; i++) for (j = ; j < N; j++) sum += a[i][j]; return sum 29 " CMSC313-F 9"

31 Locality Example" Question: Does this function have good locality?" int sumarraycols(int a[m][n]) { int i, j, sum = ; } for (j = ; j < N; j++) for (i = ; i < M; i++) sum += a[i][j]; return sum 3 " CMSC313-F 9"

32 Locality Example" Question: Can you permute the loops so that the function scans the 3-d array a[] with a stride-1 reference pattern (and thus has good spatial locality)?" int sumarray3d(int a[m][n][n]) { int i, j, k, sum = ; } for (i = ; i < N; i++) for (j = ; j < N; j++) for (k = ; k < M; k++) sum += a[k][i][j]; return sum 31 " CMSC313-F 9"

33 Memory Hierarchies" Some fundamental and enduring properties of hardware and software:" Fast storage technologies cost more per byte and have less capacity. " The gap between CPU and main memory speed is widening." Well-written programs tend to exhibit good locality." These fundamental properties complement each other beautifully." " They suggest an approach for organizing memory and storage systems known as a memory hierarchy." 32 " CMSC313-F 9"

34 An Example Memory Hierarchy" Smaller," faster," and " costlier" (per byte)" storage " devices" L2:" L:" registers" L1:" on-chip L1" cache (SRAM)" off-chip L2" cache (SRAM)" CPU registers hold words retrieved from L1 cache." L1 cache holds cache lines retrieved from the L2 cache memory." L2 cache holds cache lines retrieved from main memory." Larger, " slower, " and " cheaper " (per byte)" storage" devices" L4:" L3:" main memory" (DRAM)" local secondary storage" (local disks)" Main memory holds disk " blocks retrieved from local " disks." Local disks hold files retrieved from disks on remote network servers." L5:" remote secondary storage" (distributed file systems, Web servers)" 33 " CMSC313-F 9"

35 Caches" Cache: A smaller, faster storage device that acts as a staging area for a subset of the data in a larger, slower device." Fundamental idea of a memory hierarchy:" For each k, the faster, smaller device at level k serves as a cache for the larger, slower device at level k+1." Why do memory hierarchies work?" Programs tend to access the data at level k more often than they access the data at level k+1. " Thus, the storage at level k+1 can be slower, and thus larger and cheaper per bit." Net effect: A large pool of memory that costs as much as the cheap storage near the bottom, but that serves data to programs at the rate of the fast storage near the top." " 34 " CMSC313-F 9"

36 Caching in a Memory Hierarchy" Level k:" 4" 8" 9" 1" 14" 3" Smaller, faster, more expensive" device at level k caches a " subset of the blocks from level k+1" 1" 4" Data is copied between" levels in block-sized transfer units" Level k+1:" " 1" 2" 3" 4" 5" 6" 7" 8" 9" 1" 11" 12" 13" 14" 15" Larger, slower, cheaper storage" device at level k+1 is partitioned" into blocks." 35 " CMSC313-F 9"

37 General Caching Concepts" Level" k:" Level " k+1:" 14" 12" Request" 14" 12" " 1" 2" 3" 12" 4*" 9" 14" 3" 12" 4*" Request" 12" " 1" 2" 3" 4*" 4" 5" 6" 7" 8" 9" 1" 11" 12" 13" 14" 15" Program needs object d, which is stored in some block b." Cache hit" Program finds b in the cache at level k. E.g., block 14." Cache miss" b is not at level k, so level k cache must fetch it from level k+1. E.g., block 12." If level k cache is full, then some current block must be replaced (evicted). Which one is the victim? " Placement policy: where can the new block go? E.g., b mod 4" Replacement policy: which block should be evicted? E.g., LRU" 36 " CMSC313-F 9"

38 General Caching Concepts" Types of cache misses:" Cold (compulsary) miss" Cold misses occur because the cache is empty." Conflict miss" Most caches limit blocks at level k+1 to a small subset (sometimes a singleton) of the block positions at level k." E.g. Block i at level k+1 must be placed in block (i mod 4) at level k+1." Conflict misses occur when the level k cache is large enough, but multiple data objects all map to the same level k block." E.g. Referencing blocks, 8,, 8,, 8,... would miss every time." Capacity miss" Occurs when the set of active cache blocks (working set) is larger than the cache." 37 " CMSC313-F 9"

39 Examples of Caching in the Hierarchy" Cache Type" What Cached" Where Cached" Latency (cycles)" Managed By" Registers" 4-byte word" CPU registers" " Compiler" TLB" L1 cache" L2 cache" Virtual Memory" Buffer cache" Address translations" 32-byte block" 32-byte block" 4-KB page" Parts of files" On-Chip TLB" On-Chip L1" Off-Chip L2" Main memory" Main memory" " 1" 1" 1" 1" Hardware" Hardware" Hardware" Hardware +OS" OS" Network buffer cache" Browser cache" Web cache" Parts of files" Web pages" Web pages" Local disk" Local disk" Remote server disks" 1,," 1,," 1,,," AFS/NFS client" Web browser" Web proxy server" 38 " CMSC313-F 9"

40 CMSC 313 Lecture 13 [draft] Virtual Memory UMBC, CMSC313, Richard Chang

41 Last Time Linux/gcc/i386 Function Call Convention Now we know where our C programs store their data, right??? int global ; int main() { int *ptr, n ; printf ("Address of main: %8x\n", &main ) ; printf ("Address of global variable: %8x\n", &global ) ; printf ("Address of local variable: %8x\n", &n ) ; } ptr = (int *) malloc(4) ; printf ("Address of allocated memory: %8x\n", ptr) ; UMBC, CMSC313, Richard Chang <chang@umbc.edu>

42 Linux Virtual Memory Space " Linux reserves 1 Gig memory in the virtual address space " The size of the Linux kernel significantly affects its performance (swapping is expensive) " Linux kernel can be customized by including only relevant modules "Designating kernel space facilitates protection of "The portion of disk used for paging is called the swap space 3 Gig 4 Gig 3 Gig 3 Gig 3 Gig Linux Kernel Task #2 Task #3... Task #n Paging System RAM Disk Mohamed Younis CMCS 313, Computer Organization and Assembly Language 7

43 7-3 Chapter 7: Memory The Memory Hierarchy Fast and expensive Registers Increasing performance and increasing cost Cache Main memory Secondary storage (disks) Off-line storage (tape) Slow and inexpensive Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

44 7-28 Overlays Chapter 7: Memory A partition graph for a program with a main routine and three subroutines: Compiled program Physical Memory Main Routine Main A Partition # Subroutine A Smaller than program C B Subroutine B Partition #1 Partition graph Subroutine C Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

45 7-34 Fragmentation Chapter 7: Memory (a) Free area of memory after initialization; (b) after fragmentation; (c) after coalescing. Operating System Free Area Operating System Program A Free Area Program B Free Area Program C Operating System Program A Free Area Program B Free Area Program C Free Area Free Area Free Area Dead Zone Dead Zone Dead Zone I/O Space I/O Space I/O Space (a) (b) (c) Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

46 Memory Protection Prevents one process from reading from or writing to memory used by another process Privacy in a multiple user environments Operating system stability Prevents user processes (applications) from altering memory used by the operating system One application crashing does not cause the entire OS to crash UMBC, CMSC313, Richard Chang <chang@umbc.edu>

47 7-29 Virtual Memory Chapter 7: 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: Virtual addresses Virtual memory Page Page 1 Physical memory Physical addresses Page 2 Page frame Page 3 Page frame Page 4 Page frame Page 5 Page frame Page Page 7 Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

48 7-3 Page Table Chapter 7: Memory The page table maps between virtual memory and physical memory. Present bit Page frame Page # Disk address Present bit: : Page is not in physical memory 1: Page is in physical memory Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

49 7-31 Chapter 7: Memory Using the Page Table A virtual address is translated into a physical address: Page Offset Virtual address Physical address Page table Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

50 7-32 Using the Page Table (cont ) The configuration of a page table changes as a program executes. Initially, the page table is empty. In the final configuration, four pages are in physical memory After fault on page #1 After fault on page # Chapter 7: Memory After fault on page #2 Final Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

51 Virtual Addressing Virtual address Virtual page number Page offset Translation Physical page number Page offset Physical address Page faults are costly and take millions of cycles to process (disks are slow) 8386 Page attributes: RW: read and write permission US: User mode or kernel mode only access PP: present bit to indicate where the page is Address of Page U S W R P P Mohamed Younis CMCS 313, Computer Organization and Assembly Language 9

52 Page Table Hardware supported Page table: Resides in main memory One entry per virtual page No tag is requires since it covers all virtual pages Point directly to physical page Table can be very large Operating sys. may maintain one page table per process A dirty bit is used to track modified pages for copy back Indicates whether the virtual page is in main memory or not Page table Valid If then page is not present in memory Page table register Virtual page number Virtual address Physical page number Physical page number Physical address Page offset Page offset Mohamed Younis CMCS 313, Computer Organization and Assembly Language 1

53 Linux 2-Level Page Table CR3 register Page Table Table 124 Page Tables pages pages pages "The CR3 register is designated for pointing to the first level page table "The CR3 is part of the task state that needs to be saved at preemption Index into Page Table Table Index into Page Table Index into Page Mohamed Younis CMCS 313, Computer Organization and Assembly Language 11

54 Linear Address Translation (4-KByte Pages) Figure 3-12 shows the page directory and page-table hierarchy when mapping linear addresses to 4-KByte pages. The entries in the page directory point to page tables, and the entries in a page table point to pages in physical memory. This paging method can be used to address up to 2 2 pages, which spans a linear address space of 2 32 bytes (4 GBytes). Linear Address Directory Table Offset 12 4-KByte Page 1 Page Directory 1 Page Table Physical Address Directory Entry Page-Table Entry 2 32* CR3 (PDBR) 124 PDE * 124 PTE = 2 2 Pages *32 bits aligned onto a 4-KByte boundary. Figure Linear Address Translation (4-KByte Pages)

55 31 Page-Directory Entry (4-KByte Page Table) Page-Table Base Address Avail G P S A P C D P W T U / S R / W P Available for system programmer s use Global page (Ignored) Page size ( indicates 4 KBytes) Reserved (set to ) Accessed Cache disabled Write-through User/Supervisor Read/Write Present 31 Page-Table Entry (4-KByte Page) Page Base Address Avail P G A T P D A C D P W T U / S R / W P Available for system programmer s use Global Page Page Table Attribute Index Dirty Accessed Cache Disabled Write-Through User/Supervisor Read/Write Present Figure Format of Page-Directory and Page-Table Entries for 4-KByte Pages and 32-Bit Physical Addresses

56 7-33 Chapter 7: Memory Segmentation A segmented memory allows two users to share the same word processor code, with different data spaces: Segment # Execute only Segment #1 Read/write by user # Segment #2 Read/write by user #1 Used Used Free Used Free Unused Address space for code segment of word processor Data space for user # Data space for user #1 Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

57 7-35 Chapter 7: Memory Translation Lookaside Buffer An example TLB holds 8 entries for a system with 32 virtual pages and 16 page frames. Valid Virtual page number Physical page number Principles of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdocca and V. Heuring

58 Virtual Memory: Problems Solved Not enough physical memory Uses disk space to simulate extra memory Pages not being used can be swapped out (how and when you ll learn in CMSC 421 Operating Systems) Thrashing: pages constantly written to and retrieved from disk (time to buy more RAM) Fragmentation Contiguous blocks of virtual memory do not have to map to contiguous sections of real memory Memory protection Each process has its own page table Shared pages are read-only User processes cannot alter the page table (must be supervisor) UMBC, CMSC313, Richard Chang

59 Virtual Memory: too slow? Address translation is done in hardware In the middle of the fetch execute cycle for: MOV EAX, [buffer] the physical address of buffer is computed in hardware. Recently computed page locations are cached in the translation lookaside buffer (TLB) Page faults are very expensive (millions of cycles) Operating systems for personal computers have only recently added memory protection UMBC, CMSC313, Richard Chang

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, SPRING 2013 TOPICS TODAY End of the Semester Stuff Homework 5 Memory Hierarchy Storage Technologies (RAM & Disk) Caching END OF

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, FALL 2012

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, FALL 2012 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, FALL 2012 TOPICS TODAY Homework 5 RAM in Circuits Memory Hierarchy Storage Technologies (RAM & Disk) Caching HOMEWORK 5 RAM IN

More information

Giving credit where credit is due

Giving credit where credit is due CSCE 230J Computer Organization The Memory Hierarchy Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due Most of slides for this lecture

More information

CISC 360. The Memory Hierarchy Nov 13, 2008

CISC 360. The Memory Hierarchy Nov 13, 2008 CISC 360 The Memory Hierarchy Nov 13, 2008 Topics Storage technologies and trends Locality of reference Caching in the memory hierarchy class12.ppt Random-Access Memory (RAM) Key features RAM is packaged

More information

Random-Access Memory (RAM) Lecture 13 The Memory Hierarchy. Conventional DRAM Organization. SRAM vs DRAM Summary. Topics. d x w DRAM: Key features

Random-Access Memory (RAM) Lecture 13 The Memory Hierarchy. Conventional DRAM Organization. SRAM vs DRAM Summary. Topics. d x w DRAM: Key features Random-ccess Memory (RM) Lecture 13 The Memory Hierarchy Topics Storage technologies and trends Locality of reference Caching in the hierarchy Key features RM is packaged as a chip. Basic storage unit

More information

Key features. ! RAM is packaged as a chip.! Basic storage unit is a cell (one bit per cell).! Multiple RAM chips form a memory.

Key features. ! RAM is packaged as a chip.! Basic storage unit is a cell (one bit per cell).! Multiple RAM chips form a memory. class12.ppt 15-213 The course that gives CMU its Zip! The Memory Hierarchy Oct. 3, 22 Topics! Storage technologies and trends! Locality of reference! Caching in the hierarchy Random-ccess Memory (RM) Key

More information

The Memory Hierarchy Sept 29, 2006

The Memory Hierarchy Sept 29, 2006 15-213 The Memory Hierarchy Sept 29, 2006 Topics Storage technologies and trends Locality of reference Caching in the memory hierarchy class10.ppt Random-Access Memory (RAM) Key features RAM is traditionally

More information

Random Access Memory (RAM)

Random Access Memory (RAM) Random Access Memory (RAM) Key features RAM is traditionally packaged as a chip. Basic storage unit is normally a cell (one bit per cell). Multiple RAM chips form a memory. Static RAM (SRAM) Each cell

More information

Computer Systems. Memory Hierarchy. Han, Hwansoo

Computer Systems. Memory Hierarchy. Han, Hwansoo Computer Systems Memory Hierarchy Han, Hwansoo Random-Access Memory (RAM) Key features RAM is traditionally packaged as a chip. Basic storage unit is normally a cell (one bit per cell). Multiple RAM chips

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: November 28, 2017 at 14:31 CS429 Slideset 18: 1 Random-Access Memory

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: April 9, 2018 at 12:16 CS429 Slideset 17: 1 Random-Access Memory

More information

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University CS 201 The Memory Hierarchy Gerson Robboy Portland State University memory hierarchy overview (traditional) CPU registers main memory (RAM) secondary memory (DISK) why? what is different between these

More information

Computer Organization: A Programmer's Perspective

Computer Organization: A Programmer's Perspective A Programmer's Perspective Computer Architecture and The Memory Hierarchy Gal A. Kaminka galk@cs.biu.ac.il Typical Computer Architecture CPU chip PC (Program Counter) register file ALU Main Components

More information

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved.

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved. CS 33 Memory Hierarchy I CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved. Random-Access Memory (RAM) Key features RAM is traditionally packaged as a chip basic

More information

The Memory Hierarchy /18-213/15-513: Introduction to Computer Systems 11 th Lecture, October 3, Today s Instructor: Phil Gibbons

The Memory Hierarchy /18-213/15-513: Introduction to Computer Systems 11 th Lecture, October 3, Today s Instructor: Phil Gibbons The Memory Hierarchy 15-213/18-213/15-513: Introduction to Computer Systems 11 th Lecture, October 3, 2017 Today s Instructor: Phil Gibbons 1 Today Storage technologies and trends Locality of reference

More information

Storage Technologies and the Memory Hierarchy

Storage Technologies and the Memory Hierarchy Storage Technologies and the Memory Hierarchy 198:231 Introduction to Computer Organization Lecture 12 Instructor: Nicole Hynes nicole.hynes@rutgers.edu Credits: Slides courtesy of R. Bryant and D. O Hallaron,

More information

The Memory Hierarchy / : Introduction to Computer Systems 10 th Lecture, Feb 12, 2015

The Memory Hierarchy / : Introduction to Computer Systems 10 th Lecture, Feb 12, 2015 The Memory Hierarchy 15-213 / 18-213: Introduction to Computer Systems 10 th Lecture, Feb 12, 2015 Instructors: Seth Copen Goldstein, Franz Franchetti, Greg Kesden 1 Today The Memory Abstraction DRAM :

More information

Foundations of Computer Systems

Foundations of Computer Systems 18-600 Foundations of Computer Systems Lecture 12: The Memory Hierarchy John Shen & Zhiyi Yu October 10, 2016 Required Reading Assignment: Chapter 6 of CS:APP (3 rd edition) by Randy Bryant & Dave O Hallaron

More information

Random-Access Memory (RAM) CS429: Computer Organization and Architecture. SRAM and DRAM. Flash / RAM Summary. Storage Technologies

Random-Access Memory (RAM) CS429: Computer Organization and Architecture. SRAM and DRAM. Flash / RAM Summary. Storage Technologies Random-ccess Memory (RM) CS429: Computer Organization and rchitecture Dr. Bill Young Department of Computer Science University of Texas at ustin Key Features RM is packaged as a chip The basic storage

More information

Today. The Memory Hierarchy. Byte Oriented Memory Organization. Simple Memory Addressing Modes

Today. The Memory Hierarchy. Byte Oriented Memory Organization. Simple Memory Addressing Modes Today The Memory Hierarchy 15 213 / 18 213: Introduction to Computer Systems 1 th Lecture, Feb 14, 213 DRAM as building block for main memory Locality of reference Caching in the memory hierarchy Storage

More information

Today. The Memory Hierarchy. Random-Access Memory (RAM) Nonvolatile Memories. Traditional Bus Structure Connecting CPU and Memory

Today. The Memory Hierarchy. Random-Access Memory (RAM) Nonvolatile Memories. Traditional Bus Structure Connecting CPU and Memory Today The Hierarchy Storage technologies and trends Locality of reference Caching in the hierarchy CSci 1: Machine rchitecture and Organization November 5th-7th, 18 Your instructor: Stephen McCamant Based

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, SPRING 2013 CACHING Why: bridge speed difference between CPU and RAM Modern RAM allows blocks of memory to be read quickly Principle

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, FALL 2012

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, FALL 2012 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 27, FALL 2012 ANNOUNCEMENTS Need student input on Lecturer Search Max Morawski Lecture 2:30pm 3:15pm, Fri 12/7, ITE 217 Meet with

More information

Random-Access Memory (RAM) CISC 360. The Memory Hierarchy Nov 24, Conventional DRAM Organization. SRAM vs DRAM Summary.

Random-Access Memory (RAM) CISC 360. The Memory Hierarchy Nov 24, Conventional DRAM Organization. SRAM vs DRAM Summary. CISC 36 Random-ccess Memory (RM) The Memory Hierarchy Nov 24, 29 class12.ppt 2 CISC 36 Fa9 SRM vs DRM Summary Conventional DRM Organization Tran. ccess per bit time Persist?Sensitive? Cost pplications

More information

CMSC 313 Lecture 13 Project 4 Questions Reminder: Midterm Exam next Thursday 10/16 Virtual Memory

CMSC 313 Lecture 13 Project 4 Questions Reminder: Midterm Exam next Thursday 10/16 Virtual Memory CMSC 33 Lecture 3 Project 4 Questions Reminder: Midterm Exam next Thursday /6 Virtual Memory UMBC, CMSC33, Richard Chang CMSC 33, Computer Organization & Assembly Language Programming

More information

Announcements. Outline

Announcements. Outline 15-13 The course that gives CMU its Zip! The Memory Hierarchy Feb. 14, 8 Topics Storage technologies and trends Locality of reference Caching in the hierarchy nnouncements Recitation room changes C (Nate)

More information

+ Random-Access Memory (RAM)

+ Random-Access Memory (RAM) + Memory Subsystem + Random-Access Memory (RAM) Key features RAM is traditionally packaged as a chip. Basic storage unit is normally a cell (one bit per cell). Multiple RAM chips form a memory. RAM comes

More information

Giving credit where credit is due

Giving credit where credit is due CSCE J Computer Organization The Memor Hierarch Dr. Steve Goddard goddard@cse.unl.edu Giving credit where credit is due Most of slides for this lecture are based on slides created b Drs. Brant and O Hallaron,

More information

CSE 153 Design of Operating Systems

CSE 153 Design of Operating Systems CSE 153 Design of Operating Systems Winter 2018 Lecture 20: File Systems (1) Disk drives OS Abstractions Applications Process File system Virtual memory Operating System CPU Hardware Disk RAM CSE 153 Lecture

More information

Read-only memory (ROM): programmed during production Programmable ROM (PROM): can be programmed once SRAM (Static RAM)

Read-only memory (ROM): programmed during production Programmable ROM (PROM): can be programmed once SRAM (Static RAM) Memory Hierarchy Computer Systems Organization (Spring 2017) CSCI-UA 201, Section 3 Storage: Memory and Disk (and other I/O Devices) Instructor: Joanna Klukowska Slides adapted from Randal E. Bryant and

More information

Locality. CS429: Computer Organization and Architecture. Locality Example 2. Locality Example

Locality. CS429: Computer Organization and Architecture. Locality Example 2. Locality Example Locality CS429: Computer Organization and Architecture Dr Bill Young Department of Computer Sciences University of Texas at Austin Principle of Locality: Programs tend to reuse data and instructions near

More information

Random-Access Memory (RAM) Systemprogrammering 2007 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics

Random-Access Memory (RAM) Systemprogrammering 2007 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics Systemprogrammering 27 Föreläsning 4 Topics The memory hierarchy Motivations for VM Address translation Accelerating translation with TLBs Random-Access (RAM) Key features RAM is packaged as a chip. Basic

More information

Random-Access Memory (RAM) Systemprogrammering 2009 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics! The memory hierarchy

Random-Access Memory (RAM) Systemprogrammering 2009 Föreläsning 4 Virtual Memory. Locality. The CPU-Memory Gap. Topics! The memory hierarchy Systemprogrammering 29 Föreläsning 4 Topics! The memory hierarchy! Motivations for VM! Address translation! Accelerating translation with TLBs Random-Access (RAM) Key features! RAM is packaged as a chip.!

More information

CSE 153 Design of Operating Systems Fall 2018

CSE 153 Design of Operating Systems Fall 2018 CSE 153 Design of Operating Systems Fall 2018 Lecture 12: File Systems (1) Disk drives OS Abstractions Applications Process File system Virtual memory Operating System CPU Hardware Disk RAM CSE 153 Lecture

More information

The Memory Hierarchy. Computer Organization 2/12/2015. CSC252 - Spring Memory. Conventional DRAM Organization. Reading DRAM Supercell (2,1)

The Memory Hierarchy. Computer Organization 2/12/2015. CSC252 - Spring Memory. Conventional DRAM Organization. Reading DRAM Supercell (2,1) Computer Organization 115 The Hierarch Kai Shen Random access memor (RM) RM is traditionall packaged as a chip. Basic storage unit is normall a cell (one bit per cell). Multiple RM chips form a memor.

More information

211: Computer Architecture Summer 2016

211: Computer Architecture Summer 2016 211: Computer Architecture Summer 2016 Liu Liu Topic: Assembly Programming Storage - Assembly Programming: Recap - project2 - Structure/ Array Representation - Structure Alignment Rutgers University Liu

More information

A Computer. Computer organization - Recap. The Memory Hierarchy... Brief Overview of Memory Design. CPU has two components: Memory

A Computer. Computer organization - Recap. The Memory Hierarchy... Brief Overview of Memory Design. CPU has two components: Memory The Memory Hierarchy... CS 135: Computer Architecture 1 Instructor: Prof. Bhagi Narahari Dept. of Computer Science Course URL: www.seas.gwu.edu/~narahari/cs135/ Brief Overview of Memory Design What is

More information

The. Memory Hierarchy. Chapter 6

The. Memory Hierarchy. Chapter 6 The Memory Hierarchy Chapter 6 1 Outline! Storage technologies and trends! Locality of reference! Caching in the memory hierarchy 2 Random- Access Memory (RAM)! Key features! RAM is tradi+onally packaged

More information

Carnegie Mellon. Carnegie Mellon

Carnegie Mellon. Carnegie Mellon Today The Memory Hierarchy Storage technologies and trends Locality of reference Caching in the memory hierarchy 15-213/18-243: Introduc3on to Computer Systems 1 th Lecture, Feb. 13, 214 Instructors: Anthony

More information

CS3350B Computer Architecture

CS3350B Computer Architecture CS3350B Computer Architecture Winter 2015 Lecture 3.1: Memory Hierarchy: What and Why? Marc Moreno Maza www.csd.uwo.ca/courses/cs3350b [Adapted from lectures on Computer Organization and Design, Patterson

More information

CMSC 313 Lecture 14 Reminder: Midterm Exam next Tues (10/26) Project 4 Questions Virtual Memory on Linux/Pentium platform

CMSC 313 Lecture 14 Reminder: Midterm Exam next Tues (10/26) Project 4 Questions Virtual Memory on Linux/Pentium platform CMSC 313 Lecture 14 Reminder: Midterm Exam next Tues (10/26) roject 4 Questions Virtual Memory on Linux/entium platform UMBC, CMSC313, Richard Chang CMSC 313, Computer Organization & Assembly

More information

Lecture 15: Caches and Optimization Computer Architecture and Systems Programming ( )

Lecture 15: Caches and Optimization Computer Architecture and Systems Programming ( ) Systems Group Department of Computer Science ETH Zürich Lecture 15: Caches and Optimization Computer Architecture and Systems Programming (252-0061-00) Timothy Roscoe Herbstsemester 2012 Last time Program

More information

Computer Organization: A Programmer's Perspective

Computer Organization: A Programmer's Perspective Computer Architecture and The Memory Hierarchy Oren Kapah orenkapah.ac@gmail.com Typical Computer Architecture CPU chip PC (Program Counter) register file AL U Main Components CPU Main Memory Input/Output

More information

CS 33. Architecture and Optimization (3) CS33 Intro to Computer Systems XVI 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

CS 33. Architecture and Optimization (3) CS33 Intro to Computer Systems XVI 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. CS 33 Architecture and Optimization (3) CS33 Intro to Computer Systems XVI 1 Copyright 2018 Thomas W. Doeppner. All rights reserved. Hyper Threading Instruction Control Instruction Control Retirement Unit

More information

Memory Hierarchy. Instructor: Adam C. Champion, Ph.D. CSE 2431: Introduction to Operating Systems Reading: Chap. 6, [CSAPP]

Memory Hierarchy. Instructor: Adam C. Champion, Ph.D. CSE 2431: Introduction to Operating Systems Reading: Chap. 6, [CSAPP] Memory Hierarchy Instructor: Adam C. Champion, Ph.D. CSE 2431: Introduction to Operating Systems Reading: Chap. 6, [CSAPP] Motivation Up to this point we have relied on a simple model of a computer system

More information

Large and Fast: Exploiting Memory Hierarchy

Large and Fast: Exploiting Memory Hierarchy CSE 431: Introduction to Operating Systems Large and Fast: Exploiting Memory Hierarchy Gojko Babić 10/5/018 Memory Hierarchy A computer system contains a hierarchy of storage devices with different costs,

More information

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory Memory Hierarchy Contents Memory System Overview Cache Memory Internal Memory External Memory Virtual Memory Memory Hierarchy Registers In CPU Internal or Main memory Cache RAM External memory Backing

More information

CS 2461: Computer Architecture 1 The Memory Hierarchy and impact on program performance

CS 2461: Computer Architecture 1 The Memory Hierarchy and impact on program performance Next CS 2461: The Memory Hierarchy and impact on program performance Instructor: Prof. Bhagi Narahari Performance of programs What to measure Model? Technology trends real processors how to improve performance

More information

Problem: Processor- Memory Bo<leneck

Problem: Processor- Memory Bo<leneck Storage Hierarchy Instructor: Sanjeev Se(a 1 Problem: Processor- Bo

More information

Computer Architecture and System Software Lecture 08: Assembly Language Programming + Memory Hierarchy

Computer Architecture and System Software Lecture 08: Assembly Language Programming + Memory Hierarchy Computer Architecture and System Software Lecture 08: Assembly Language Programming + Memory Hierarchy Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Chapter 6 The

More information

Denison University. Cache Memories. CS-281: Introduction to Computer Systems. Instructor: Thomas C. Bressoud

Denison University. Cache Memories. CS-281: Introduction to Computer Systems. Instructor: Thomas C. Bressoud Cache Memories CS-281: Introduction to Computer Systems Instructor: Thomas C. Bressoud 1 Random-Access Memory (RAM) Key features RAM is traditionally packaged as a chip. Basic storage unit is normally

More information

Memory Management! Goals of this Lecture!

Memory Management! Goals of this Lecture! Memory Management! Goals of this Lecture! Help you learn about:" The memory hierarchy" Why it works: locality of reference" Caching, at multiple levels" Virtual memory" and thereby " How the hardware and

More information

F28HS Hardware-Software Interface: Systems Programming

F28HS Hardware-Software Interface: Systems Programming F28HS Hardware-Software Interface: Systems Programming Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 2 2016/17 0 No proprietary software has

More information

Systems Programming and Computer Architecture ( ) Timothy Roscoe

Systems Programming and Computer Architecture ( ) Timothy Roscoe Systems Group Department of Computer Science ETH Zürich Systems Programming and Computer Architecture (252-0061-00) Timothy Roscoe Herbstsemester 2016 AS 2016 Caches 1 16: Caches Computer Architecture

More information

Computer Architecture and System Software Lecture 09: Memory Hierarchy. Instructor: Rob Bergen Applied Computer Science University of Winnipeg

Computer Architecture and System Software Lecture 09: Memory Hierarchy. Instructor: Rob Bergen Applied Computer Science University of Winnipeg Computer Architecture and System Software Lecture 09: Memory Hierarchy Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Midterm returned + solutions in class today SSD

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 153 Design of Operating Systems Spring 18 Lectre 18: Memory Hierarchy Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Some slides modified from originals

More information

Memory Management. Goals of this Lecture. Motivation for Memory Hierarchy

Memory Management. Goals of this Lecture. Motivation for Memory Hierarchy Memory Management Goals of this Lecture Help you learn about: The memory hierarchy Spatial and temporal locality of reference Caching, at multiple levels Virtual memory and thereby How the hardware and

More information

Memory Management! How the hardware and OS give application pgms:" The illusion of a large contiguous address space" Protection against each other"

Memory Management! How the hardware and OS give application pgms: The illusion of a large contiguous address space Protection against each other Memory Management! Goals of this Lecture! Help you learn about:" The memory hierarchy" Spatial and temporal locality of reference" Caching, at multiple levels" Virtual memory" and thereby " How the hardware

More information

The Memory Hierarchy 10/25/16

The Memory Hierarchy 10/25/16 The Memory Hierarchy 10/25/16 Transition First half of course: hardware focus How the hardware is constructed How the hardware works How to interact with hardware Second half: performance and software

More information

CS 261 Fall Mike Lam, Professor. Memory

CS 261 Fall Mike Lam, Professor. Memory CS 261 Fall 2016 Mike Lam, Professor Memory Topics Memory hierarchy overview Storage technologies SRAM DRAM PROM / flash Disk storage Tape and network storage I/O architecture Storage trends Latency comparisons

More information

CS356: Discussion #9 Memory Hierarchy and Caches. Marco Paolieri Illustrations from CS:APP3e textbook

CS356: Discussion #9 Memory Hierarchy and Caches. Marco Paolieri Illustrations from CS:APP3e textbook CS356: Discussion #9 Memory Hierarchy and Caches Marco Paolieri (paolieri@usc.edu) Illustrations from CS:APP3e textbook The Memory Hierarchy So far... We modeled the memory system as an abstract array

More information

Module 1: Basics and Background Lecture 4: Memory and Disk Accesses. The Lecture Contains: Memory organisation. Memory hierarchy. Disks.

Module 1: Basics and Background Lecture 4: Memory and Disk Accesses. The Lecture Contains: Memory organisation. Memory hierarchy. Disks. The Lecture Contains: Memory organisation Example of memory hierarchy Memory hierarchy Disks Disk access Disk capacity Disk access time Typical disk parameters Access times file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture4/4_1.htm[6/14/2012

More information

CS 240 Stage 3 Abstractions for Practical Systems

CS 240 Stage 3 Abstractions for Practical Systems CS 240 Stage 3 Abstractions for Practical Systems Caching and the memory hierarchy Operating systems and the process model Virtual memory Dynamic memory allocation Victory lap Memory Hierarchy: Cache Memory

More information

Lecture 18: Memory Systems. Spring 2018 Jason Tang

Lecture 18: Memory Systems. Spring 2018 Jason Tang Lecture 18: Memory Systems Spring 2018 Jason Tang 1 Topics Memory hierarchy Memory operations Cache basics 2 Computer Organization Computer Processor Memory Devices Control Datapath Input Output So far,

More information

CS 261 Fall Mike Lam, Professor. Memory

CS 261 Fall Mike Lam, Professor. Memory CS 261 Fall 2017 Mike Lam, Professor Memory Topics Memory hierarchy overview Storage technologies I/O architecture Storage trends Latency comparisons Locality Memory Until now, we've referred to memory

More information

Roadmap. Java: Assembly language: OS: Machine code: Computer system:

Roadmap. Java: Assembly language: OS: Machine code: Computer system: Roadmap C: car *c = malloc(sizeof(car)); c->miles = 100; c->gals = 17; float mpg = get_mpg(c); free(c); Assembly language: Machine code: get_mpg: pushq movq... popq ret %rbp %rsp, %rbp %rbp 0111010000011000

More information

CSCI-UA.0201 Computer Systems Organization Memory Hierarchy

CSCI-UA.0201 Computer Systems Organization Memory Hierarchy CSCI-UA.0201 Computer Systems Organization Memory Hierarchy Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Programmer s Wish List Memory Private Infinitely large Infinitely fast Non-volatile

More information

CS 31: Intro to Systems Storage and Memory. Kevin Webb Swarthmore College March 17, 2015

CS 31: Intro to Systems Storage and Memory. Kevin Webb Swarthmore College March 17, 2015 CS 31: Intro to Systems Storage and Memory Kevin Webb Swarthmore College March 17, 2015 Transition First half of course: hardware focus How the hardware is constructed How the hardware works How to interact

More information

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy Chapter 5 Large and Fast: Exploiting Memory Hierarchy Principle of Locality Programs access a small proportion of their address space at any time Temporal locality Items accessed recently are likely to

More information

Review: Assembly Programmer s View. The Memory Hierarchy. Random- Access Memory (RAM) Today. NonvolaHle Memories. SRAM vs DRAM Summary

Review: Assembly Programmer s View. The Memory Hierarchy. Random- Access Memory (RAM) Today. NonvolaHle Memories. SRAM vs DRAM Summary Review: ssembly Programmer s View The Hierarchy CSCI 1: Machine rchitecture and OrganizaHon Pen- Chung Yew Department Computer Science and Engineering University of Minnesota PC CPU Registers Condition

More information

General Cache Mechanics. Memory Hierarchy: Cache. Cache Hit. Cache Miss CPU. Cache. Memory CPU CPU. Cache. Cache. Memory. Memory

General Cache Mechanics. Memory Hierarchy: Cache. Cache Hit. Cache Miss CPU. Cache. Memory CPU CPU. Cache. Cache. Memory. Memory Hierarchy: hierarchy basics Locality organization -aware programming General Mechanics CP 8 9 4 Data is moved in units 4 5 6 7 8 9 4 5 Block: unit of data in cache and memory. (a.k.a. line) Smaller, faster,

More information

CHAPTER 6 Memory. CMPS375 Class Notes Page 1/ 16 by Kuo-pao Yang

CHAPTER 6 Memory. CMPS375 Class Notes Page 1/ 16 by Kuo-pao Yang CHAPTER 6 Memory 6.1 Memory 233 6.2 Types of Memory 233 6.3 The Memory Hierarchy 235 6.3.1 Locality of Reference 237 6.4 Cache Memory 237 6.4.1 Cache Mapping Schemes 239 6.4.2 Replacement Policies 247

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2014 Lecture 14

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2014 Lecture 14 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2014 Lecture 14 LAST TIME! Examined several memory technologies: SRAM volatile memory cells built from transistors! Fast to use, larger memory cells (6+ transistors

More information

CPSC 352. Chapter 7: Memory. Computer Organization. Principles of Computer Architecture by M. Murdocca and V. Heuring

CPSC 352. Chapter 7: Memory. Computer Organization. Principles of Computer Architecture by M. Murdocca and V. Heuring 7- CPSC 352 Computer Organization 7-2 Chapter Contents 7. The Memory Hierarchy 7.2 Random Access Memory 7.3 Chip Organization 7.4 Commercial Memory Modules 7.5 Read-Only Memory 7.6 Cache Memory 7.7 Virtual

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2017 Lecture 13 COMPUTER MEMORY So far, have viewed computer memory in a very simple way Two memory areas in our computer: The register file Small number

More information

CHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang

CHAPTER 6 Memory. CMPS375 Class Notes (Chap06) Page 1 / 20 Dr. Kuo-pao Yang CHAPTER 6 Memory 6.1 Memory 341 6.2 Types of Memory 341 6.3 The Memory Hierarchy 343 6.3.1 Locality of Reference 346 6.4 Cache Memory 347 6.4.1 Cache Mapping Schemes 349 6.4.2 Replacement Policies 365

More information

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili Virtual Memory Lecture notes from MKP and S. Yalamanchili Sections 5.4, 5.5, 5.6, 5.8, 5.10 Reading (2) 1 The Memory Hierarchy ALU registers Cache Memory Memory Memory Managed by the compiler Memory Managed

More information

k -bit address bus n-bit data bus Control lines ( R W, MFC, etc.)

k -bit address bus n-bit data bus Control lines ( R W, MFC, etc.) THE MEMORY SYSTEM SOME BASIC CONCEPTS Maximum size of the Main Memory byte-addressable CPU-Main Memory Connection, Processor MAR MDR k -bit address bus n-bit data bus Memory Up to 2 k addressable locations

More information

Chapter 6 Caches. Computer System. Alpha Chip Photo. Topics. Memory Hierarchy Locality of Reference SRAM Caches Direct Mapped Associative

Chapter 6 Caches. Computer System. Alpha Chip Photo. Topics. Memory Hierarchy Locality of Reference SRAM Caches Direct Mapped Associative Chapter 6 s Topics Memory Hierarchy Locality of Reference SRAM s Direct Mapped Associative Computer System Processor interrupt On-chip cache s s Memory-I/O bus bus Net cache Row cache Disk cache Memory

More information

Problem: Processor Memory BoJleneck

Problem: Processor Memory BoJleneck Today Memory hierarchy, caches, locality Cache organiza:on Program op:miza:ons that consider caches CSE351 Inaugural Edi:on Spring 2010 1 Problem: Processor Memory BoJleneck Processor performance doubled

More information

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 5 Large and Fast: Exploiting Memory Hierarchy 5 th Edition Memory Technology Static RAM (SRAM) 0.5ns 2.5ns, $2000 $5000 per GB Dynamic

More information

CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture

CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture UMBC, CMSC313, Richard Chang CMSC 313, Computer Organization & Assembly Language Programming

More information

Chapter 5B. Large and Fast: Exploiting Memory Hierarchy

Chapter 5B. Large and Fast: Exploiting Memory Hierarchy Chapter 5B Large and Fast: Exploiting Memory Hierarchy One Transistor Dynamic RAM 1-T DRAM Cell word access transistor V REF TiN top electrode (V REF ) Ta 2 O 5 dielectric bit Storage capacitor (FET gate,

More information

Memory Hierarchy. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Memory Hierarchy. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Memory Hierarchy Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Time (ns) The CPU-Memory Gap The gap widens between DRAM, disk, and CPU speeds

More information

CS241 Computer Organization Spring Principle of Locality

CS241 Computer Organization Spring Principle of Locality CS241 Computer Organization Spring 2015 Principle of Locality 4-21 2015 Outline! Optimization! Memory Hierarchy Locality temporal spatial Cache Readings: CSAPP2: Chapter 5, sections 5.1-5.6; 5.13 CSAPP2:

More information

Adapted from instructor s supplementary material from Computer. Patterson & Hennessy, 2008, MK]

Adapted from instructor s supplementary material from Computer. Patterson & Hennessy, 2008, MK] Lecture 17 Adapted from instructor s supplementary material from Computer Organization and Design, 4th Edition, Patterson & Hennessy, 2008, MK] SRAM / / Flash / RRAM / HDD SRAM / / Flash / RRAM/ HDD SRAM

More information

198:231 Intro to Computer Organization. 198:231 Introduction to Computer Organization Lecture 14

198:231 Intro to Computer Organization. 198:231 Introduction to Computer Organization Lecture 14 98:23 Intro to Computer Organization Lecture 4 Virtual Memory 98:23 Introduction to Computer Organization Lecture 4 Instructor: Nicole Hynes nicole.hynes@rutgers.edu Credits: Several slides courtesy of

More information

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck Main memory management CMSC 411 Computer Systems Architecture Lecture 16 Memory Hierarchy 3 (Main Memory & Memory) Questions: How big should main memory be? How to handle reads and writes? How to find

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 5 Large and Fast: Exploiting Memory Hierarchy Principle of Locality Programs access a small proportion of their address

More information

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing Microcontroller Systems ELET 3232 Topic 11: General Memory Interfacing 1 Objectives To become familiar with the concepts of memory expansion and the data and address bus To design embedded systems circuits

More information

CENG3420 Lecture 08: Memory Organization

CENG3420 Lecture 08: Memory Organization CENG3420 Lecture 08: Memory Organization Bei Yu byu@cse.cuhk.edu.hk (Latest update: February 22, 2018) Spring 2018 1 / 48 Overview Introduction Random Access Memory (RAM) Interleaving Secondary Memory

More information

Computer Organization and Assembly Language (CS-506)

Computer Organization and Assembly Language (CS-506) Computer Organization and Assembly Language (CS-506) Muhammad Zeeshan Haider Ali Lecturer ISP. Multan ali.zeeshan04@gmail.com https://zeeshanaliatisp.wordpress.com/ Lecture 2 Memory Organization and Structure

More information

211: Computer Architecture Summer 2016

211: Computer Architecture Summer 2016 211: Computer Architecture Summer 2016 Liu Liu Topic: Assembly Programming Storage - Assembly Programming: Recap - Call-chain - Factorial - Storage: - RAM - Caching - Direct - Mapping Rutgers University

More information

UNIT-V MEMORY ORGANIZATION

UNIT-V MEMORY ORGANIZATION UNIT-V MEMORY ORGANIZATION 1 The main memory of a computer is semiconductor memory.the main memory unit is basically consists of two kinds of memory: RAM (RWM):Random access memory; which is volatile in

More information

CMPSC 311- Introduction to Systems Programming Module: Caching

CMPSC 311- Introduction to Systems Programming Module: Caching CMPSC 311- Introduction to Systems Programming Module: Caching Professor Patrick McDaniel Fall 2016 Reminder: Memory Hierarchy L0: Registers CPU registers hold words retrieved from L1 cache Smaller, faster,

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 23 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 205 Lecture 23 LAST TIME: VIRTUAL MEMORY! Began to focus on how to virtualize memory! Instead of directly addressing physical memory, introduce a level of

More information

Chapter 6 Memory 11/3/2015. Chapter 6 Objectives. 6.2 Types of Memory. 6.1 Introduction

Chapter 6 Memory 11/3/2015. Chapter 6 Objectives. 6.2 Types of Memory. 6.1 Introduction Chapter 6 Objectives Chapter 6 Memory Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance, and how the performance is measured.

More information

virtual memory. March 23, Levels in Memory Hierarchy. DRAM vs. SRAM as a Cache. Page 1. Motivation #1: DRAM a Cache for Disk

virtual memory. March 23, Levels in Memory Hierarchy. DRAM vs. SRAM as a Cache. Page 1. Motivation #1: DRAM a Cache for Disk 5-23 March 23, 2 Topics Motivations for VM Address translation Accelerating address translation with TLBs Pentium II/III system Motivation #: DRAM a Cache for The full address space is quite large: 32-bit

More information

Computer Architecture and System Software Lecture 12: Review. Instructor: Rob Bergen Applied Computer Science University of Winnipeg

Computer Architecture and System Software Lecture 12: Review. Instructor: Rob Bergen Applied Computer Science University of Winnipeg Computer Architecture and System Software Lecture 12: Review Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Assignment 5 due today Assignment 5 grades will be e-mailed

More information

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102 Semiconductor Memory Types Microprocessor Design & Organisation HCA2102 Internal & External Memory Semiconductor Memory RAM Misnamed as all semiconductor memory is random access Read/Write Volatile Temporary

More information