Compsci 104. Duke University. Input/Output. Instructors: Alvin R. Lebeck. Some Slides provided by Randy Bryant and Dave O Hallaron and G.

Size: px
Start display at page:

Download "Compsci 104. Duke University. Input/Output. Instructors: Alvin R. Lebeck. Some Slides provided by Randy Bryant and Dave O Hallaron and G."

Transcription

1 Input/Output Instructors: Alvin R. Lebeck Some Slides provided by Randy Bryant and Dave O Hallaron and G. Kedem 1

2 Administrivia HW #7 up, Due Monday Dec 5 (no late submissions) Work on processor project, Due Dec 7 (no late submissions) Final Exam: Sunday Dec 18, 2pm- 5pm Alex will have a review session This is where you should ask about anything from the sample final I will post 2

3 Overview Core i7 Virtual Memory I/O devices device controller Device drivers Memory Mapped I/O Programmed I/O Direct Memory Access (DMA) RotaRonal media (disks) 3

4 Review: Virtual Memory Virtual Address (VA) Physical Address (PA) Process = virtual address space + thread of control TranslaRon VA - > PA What physical address does virtual address A map to Is VA in physical memory? ProtecRon (access control) Do you have permission to access it? CPS 104 4

5 Review: Page Tables A page table is an array of page table entries (PTEs) that maps virtual pages to physical pages. Per- process kernel data structure in DRAM Valid PTE PTE 7 1 Physical page number or disk address null null Memory resident page table (DRAM) Physical memory (DRAM) VP 1 VP 2 VP 7 VP 4 Virtual memory (disk) VP 1 VP 2 VP 3 VP 4 VP 6 VP 7 PP 0 PP 3 5

6 Review: IntegraRng VM and Cache PTE CPU Chip CPU VA MMU PTEA PA PTEA hit PTEA miss PA miss PTE PTEA PA Memory PA hit Data Data L1 cache VA: virtual address, PA: physical address, PTE: page table entry, PTEA = PTE address 6

7 Review: Speeding up TranslaRon with a TLB Page table entries (PTEs) are cached in L1 like any other memory word PTEs may be evicted by other data references PTE hit sqll requires a small L1 delay SoluRon: Transla@on Lookaside Buffer (TLB) Small hardware cache in MMU Maps virtual page numbers to physical page numbers Contains complete page table entries for small number of pages 7

8 Intel Core i7 Memory System Processor package Core x4 Registers InstrucRon fetch MMU (addr translaron) L1 d- cache 32 KB, 8- way L1 i- cache 32 KB, 8- way L1 d- TLB 64 entries, 4- way L1 i- TLB 128 entries, 4- way L2 unified cache 256 KB, 8- way L2 unified TLB 512 entries, 4- way QuickPath interconnect GB/s each To other cores To I/O bridge L3 unified cache 8 MB, 16- way (shared by all cores) DDR3 Memory controller 3 x GB/s 32 GB/s total (shared by all cores) Main memory 8

9 Review of Symbols Basic Parameters N = 2 n : Number of addresses in virtual address space M = 2 m : Number of addresses in physical address space P = 2 p : Page size (bytes) Components of the virtual address (VA) TLBI: TLB index TLBT: TLB tag VPO: Virtual page offset VPN: Virtual page number Components of the physical address (PA) PPO: Physical page offset (same as VPO) PPN: Physical page number CO: Byte offset within cache line CI: Cache index CT: Cache tag 9

10 End- to- end Core i7 Address TranslaRon VPN TLB miss CPU VPO 32 4 TLBT TLBI Virtual address (VA)... TLB hit 32/64 Result L1 hit L1 d- cache (64 sets, 8 lines/set)... L2, L3, and main memory L1 miss L1 TLB (16 sets, 4 entries/set) CR3 9 9 VPN1 VPN2 PTE 9 9 VPN3 VPN4 PTE PTE PTE PPN PPO Physical address (PA) CT CI CO Page tables 10

11 Core i7 Level 1-3 Page Table Entries 63 XD 62 Unused Page table physical base address Unused G PS A CD WT U/S R/W P=1 Available for OS (page table locaron on disk) P=0 Each entry references a 4K child page table P: Child page table present in physical memory (1) or not (0). R/W: Read- only or read- write access access permission for all reachable pages. U/S: user or supervisor (kernel) mode access permission for all reachable pages. WT: Write- through or write- back cache policy for the child page table. CD: Caching disabled or enabled for the child page table. A: Reference bit (set by MMU on reads and writes, cleared by so^ware). PS: Page size either 4 KB or 4 MB (defined for Level 1 PTEs only). G: Global page (don t evict from TLB on task switch) Page table physical base address: 40 most significant bits of physical page table address (forces page tables to be 4KB aligned) 11

12 Core i7 Level 4 Page Table Entries 63 XD 62 Unused Page physical base address Unused G D A CD WT U/S R/W P=1 Available for OS (page locaron on disk) P=0 Each entry references a 4K child page P: Child page is present in memory (1) or not (0) R/W: Read- only or read- write access permission for child page U/S: User or supervisor mode access WT: Write- through or write- back cache policy for this page CD: Cache disabled (1) or enabled (0) A: Reference bit (set by MMU on reads and writes, cleared by so^ware) D: Dirty bit (set by MMU on writes, cleared by so^ware) G: Global page (don t evict from TLB on task switch) Page physical base address: 40 most significant bits of physical page address (forces pages to be 4KB aligned) 12

13 Core i7 Page Table TranslaRon 9 VPN 1 9 VPN 2 9 VPN 3 VPN Virtual VPO address CR3 Physical address of L1 PT 40 / L1 PT Page global directory L1 PTE 40 / L2 PT Page upper directory L2 PTE 40 / L3 PT Page middle directory L3 PTE 40 / L4 PT Page table L4 PTE / 12 Offset into physical and virtual page 512 GB region per entry 1 GB region per entry 2 MB region per entry 4 KB region per entry Physical address of page 40 / Physical PPO address PPN 13

14 Cute Trick for Speeding Up L1 Cache Access CT Tag Check Physical address (PA) CT CI CO PPN PPO Virtual address (VA) Address TranslaRon VPN VPO No Change ObservaRon Bits that determine CI idenqcal in virtual and physical address Can index into cache while address translaqon taking place Generally we hit in TLB, so PPN bits (CT bits) available next Virtually indexed, physically tagged Cache carefully sized to make this possible CI L1 Cache 14

15 Virtual Memory of a Linux Process Different for each process Iden@cal for each process Process- specific data structs (ptables, task and mm structs, kernel stack) Physical memory Kernel code and data Kernel virtual memory %esp User stack brk Memory mapped region for shared libraries RunRme heap (malloc) Process virtual memory 0x (32) 0x (64) 0 UniniRalized data (.bss) IniRalized data (.data) Program text (.text) 15

16 Linux Organizes VM as CollecRon of Areas task_struct mm mm_struct pgd mmap vm_area_struct vm_end vm_start vm_prot vm_flags vm_next Process virtual memory Shared libraries pgd: Page global directory address Points to L1 page table vm_prot: Read/write permissions for this area vm_flags Pages shared with other processes or private to this process vm_end vm_start vm_prot vm_flags vm_next vm_end vm_start vm_prot vm_flags vm_next Data Text 0 16

17 Linux Page Fault Handling vm_area_struct Process virtual memory vm_end vm_start vm_prot vm_flags vm_next vm_end vm_start vm_prot vm_flags shared libraries data 1 read 3 read Segmentation fault: accessing a non- exisrng page Normal page fault vm_next vm_end vm_start vm_prot vm_flags vm_next text 2 write ProtecRon excepron: e.g., violarng permission by wrirng to a read- only page (Linux reports as SegmentaRon fault) 17

18 VirtualizaRon (VMware) Boot and run mulrple operarng systems Windows, MacOS, Linux all at once Not dual booqng! Requires special support for efficiency New privilege mode for hypervisor 18

19 Overview I/O devices device controller Device drivers Memory Mapped I/O Programmed I/O Direct Memory Access (DMA) RotaRonal media (disks) 19

20 Why I/O? InteracRve ApplicaRons (keyboard, mouse, screen) Long term storage (files, data repository) Swap for VM Many different devices character vs. block Networks are everywhere! 10 6 difference CPU (10-9 ) & I/O (10-3 ) Response Time vs. Throughput Not always another process to execute OS hides (some) differences in devices same (similar) interface to many devices Permits many apps to share one device 20

21 I/O Device Examples Device Behavior Partner Data Rate Keyboard Input Human 0.01 (KB/s) Mouse Input Human 0.02 (KB/s) Laser Printer Output Human (KB/s) OpQcal Disk Storage Machine (KB/s) MagneQc Disk Storage Machine (MB/s) USB 1.1 Input/Output Machine 1.50 (MB/s) USB 2.0 Input/Output Machine (MB/s) Flash drive I/O device Machine (MB/s) Network- LAN Input/Output Machine 1.00 (Gb/s) Graphics Display Output Human 8.00 (GB/s) L2 cache bandwidth ~50.00 (GB/s) 21

22 I/O Systems Processor interrupts Cache Memory Bus Core Chip Set I/O Bridge Main Memory Disk Controller I/O Bus Graphics Controller Network Interface I/O Devices Disk Disk Graphics Network Time(workload) = Time(CPU) + Time(I/O) - Time(Overlap) 22

23 Device Drivers Sosware that provides access to devices (mp3, camera, phone, FLASH drive) top- half ApplicaQon Programming Interface (API): e.g., open, close, read, write, ioctl I/O Control: e.g., IOCTL, device specific arguments botom- half interrupt handler communicates with device resumes process Must have access to user address space and device control registers => runs in kernel mode. 23

24 Review: Handling an Interrupt/ExcepRon User Program movl add movl mul jne movl Sub jne Interrupt Handler iret Service Routines Invoke specific kernel rourne based on type of interrupt interrupt/excepqon handler Must determine what caused interrupt Clear the interrupt Return from interrupt (iret) 24

25 Processor <- > Device Interface Issues InterconnecRons Busses Processor interface I/O InstrucQons Memory mapped I/O I/O Control Structures Device Controllers Polling/Interrupts Data movement Programmed I/O / DMA Capacity, Access Time, Bandwidth 25

26 Device Controllers Interrupt? Busy Done Error Bus Command Status Data 0 Device Controller Data 1 Data n-1 Controller deals with mundane control (e.g., position head, error detection/correction) Processor communicates with Controller Device 26

27 I/O InstrucRons Separate instrucrons (in, out): Like the processor in your project Independent I/O Bus CPU memory bus Memory Controller Controller Device Device 27

28 Memory Mapped I/O Issue command through store instrucron Check status with load instrucron Caches? Physical Address ROM RAM CPU $ Device I/O L2 $ Controller Memory Bus I/O bus Memory Bus Adapter Bridge 28

29 CommunicaRng with the processor Polling can waste Qme waiqng for slow I/O device busy wait can interleave with useful work Interrupts interrupt overhead interrupt could happen anyqme - asynchronous no busy wait 29

30 Data Movement Programmed I/O processor has to touch all the data too much processor overhead for high bandwidth devices (disk, network) DMA processor sets up transfer(s) DMA controller transfers data complicates memory system 30

31 Programmed I/O & Polling Advantage: CPU totally in control Disadvantage: Overhead of polling Program must perform check of device, thus can t do useful work yes Is the data ready? load data no store data done? no yes 31

32 Programmed I/O & Interrupt Driven Data Transfer CPU $ L2 $ Device Controller (1) I/O interrupt add sub and or nop user program Memory Bus (2) save PC I/O bus Memory Bus Adapter (3) interrupt service addr User program progress halted only during actual transfer (4) read store... rq memory interrupt service rouqne Interrupt overhead can dominate transfer Rme Processor must touch all data too slow for some devices 32

33 Direct Memory Access (DMA) CPU sends a starqng address, direcqon, and length count to DMAC. Then issues "start". CPU delegates responsibility for data transfer to a special controller CPU $ 0 ROM L2 $ Memory Bus I/O bus Memory Mapped I/O RAM Memory Bus Adapter DMA CNTRL DMAC provides handshake signals for device controller, and memory addresses and handshake signals for memory. n Peripherals DMAC 33

34 I/O and Virtual Caches Virtual Cache Processor interrupts Physical Addresses Cache Memory Bus I/O Bridge I/O is accomplished with physical addresses DMA flush pages from cache need pa- >va reverse translaron coherent DMA Main Memory Disk Controller Disk Disk I/O Bus Graphics Controller Graphics Network Interface Network 34

35 Other I/O Issues MulRple devices want to use the same bus (wires)? ArbitraRon Daisy chain Centralized Distributed 35

36 Obtaining Access to the Bus Control: Master inirates requests Bus Master Data can go either way Bus Slave One of the most important issues in bus design: How is the bus reserved by a devices that wishes to use it? Chaos is avoided by a master- slave arrangement: Only the bus master can control access to the bus: It iniqates and controls all bus requests A slave responds to read and write requests The simplest system: Processor is the only bus master All bus requests must be controlled by the processor Major drawback: the processor is involved in every transacqon 36

37 MulRple PotenRal Bus Masters: the Need for ArbitraRon Bus arbitraron scheme: A bus master wanqng to use the bus asserts the bus request A bus master cannot use the bus unql its request is granted A bus master must signal to the arbiter a^er finish using the bus Bus arbitraron schemes usually try to balance two factors: Bus priority: the highest priority device should be serviced first Fairness: Even the lowest priority device should never be completely locked out from the bus Bus arbitraron schemes can be divided into four broad classes: Distributed arbitraqon by self- selecqon: each device wanqng the bus places a code indicaqng its idenqty on the bus. Distributed arbitraqon by collision detecqon: Ethernet uses this. Daisy chain arbitraqon: single device with all request lines. Centralized, parallel arbitraqon: see next- next slide 37

38 Centralized Bus ArbitraRon ArbitraRon Circuit Request- B Grant- B Request- A Grant- A Release Request- C Grant- C Master A Master B Master C 38

39 The Daisy Chain Bus ArbitraRon Scheme Device 1 Highest Priority Device 2 Device N Lowest Priority Grant Grant Grant Bus Arbiter Release Request Advantage: simple Disadvantages: Cannot assure fairness: A low- priority device may be locked out indefinitely The use of the daisy chain grant signal also limits the bus speed 39

40 Types of Storage Devices MagneRc Disks FLASH Drive (USB SRck, SSD) MagneRc Tapes CD/DVD Juke Box (automated tape library, robots) 40

41 What s Inside A Disk Drive? Arm Spindle Platters Actuator SCSI connector Electronics (including a processor and memory!) Image courtesy of Seagate Technology 41

42 Disk Geometry Disks consist of platers, 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 42

43 Disk Geometry (Muliple- Plater View) Aligned tracks form a cylinder. Cylinder k Surface 0 Surface 1 Surface 2 Surface 3 Surface 4 Surface 5 Platter 0 Platter 1 Platter 2 Spindle 43

44 Disk Capacity Capacity: maximum number of bits that can be stored. Vendors express capacity in units of gigabytes (GB), where 1 GB = 10 9 Bytes ( < 2 20 Bytes, be careful) 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 parrron 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 44

45 CompuRng Disk Capacity Capacity = (# bytes/sector) x (avg. # sectors/track) x (# tracks/surface) x (# surfaces/plater) x (# platers/disk) Example: 512 bytes/sector 300 sectors/track (on average) 20,000 tracks/surface 2 surfaces/plarer 5 plarers/disk Capacity = 512 x 300 x x 2 x 5 = 30,720,000,000 = GB 45

46 Disk OperaRon (Single- Plater 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. 46

47 Disk OperaRon (MulR- Plater View) Read/write heads move in unison from cylinder to cylinder Arm Spindle 47

48 Disk Structure - top view of single plater Surface organized into tracks Tracks divided into sectors 48

49 Disk Access Head in position above a track 49

50 Disk Access Rotation is counter-clockwise 50

51 Disk Access Read About to read blue sector 51

52 Disk Access Read After BLUE read After reading blue sector 52

53 Disk Access Read After BLUE read Red request scheduled next 53

54 Disk Access Seek After BLUE read Seek for RED Seek to red s track 54

55 Disk Access RotaRonal Latency After BLUE read Seek for RED Rotational latency Wait for red sector to rotate around 55

56 Disk Access Read After BLUE read Seek for RED Rotational latency After RED read Complete read of red 56

57 Disk Access Service Time Components After BLUE read Seek for RED Rotational latency After RED read Data transfer Seek RotaRonal latency Data transfer 57

58 Disk Access Time Average Rme to access some target sector approximated by : Taccess = Tavg seek + Tavg rotaqon + Tavg transfer Seek Rme (Tavg seek) Time to posiqon heads over cylinder containing target sector. Typical Tavg seek is 3 9 ms RotaRonal latency (Tavg rotaron) Time waiqng for first bit of target sector to pass under r/w head. Tavg rotaqon = 1/2 x 1/RPMs x 60 sec/1 min Typical Tavg rotaqon = 7200 RPMs Transfer Rme (Tavg transfer) Time to read the bits in the target sector. Tavg transfer = 1/RPM x 1/(avg # sectors/track) x 60 secs/1 min. 58

59 Disk Access Time Example Given: RotaQonal rate = 7,200 RPM Average seek Qme = 9 ms. Avg # sectors/track = 400. Derived: Tavg rotaqon = 1/2 x (60 secs/7200 RPM) x 1000 ms/sec = 4 ms. Tavg transfer = 60/7200 RPM x 1/400 secs/track x 1000 ms/sec = 0.02 ms Taccess = 9 ms + 4 ms ms Important points: Access Qme dominated by seek Qme and rotaqonal latency. First bit in a sector is the most expensive, the rest are free. SRAM access Qme is about 4 ns/doubleword, DRAM about 60 ns Disk is about 40,000 Qmes slower than SRAM, 2,500 Qmes slower then DRAM. 59

60 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 (0, 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 formared capacity and maximum capacity. 60

61 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 61

62 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 62

63 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 63

64 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 64

65 Solid State Disks (SSDs) Solid State Disk (SSD) Flash memory Block 0 I/O bus Page 0 Page 1 Page P-1 Flash translation layer Requests to read and write logical disk blocks Block B-1 Page 0 Page 1 Page P-1 Pages: 512KB to 4KB, Blocks: 32 to 128 pages Data read/writen in units of pages. Page can be writen only aser its block has been erased A block wears out aser 100,000 repeated writes. 65

66 SSD Performance CharacterisRcs SequenRal read tput 250 MB/s SequenRal write tput 170 MB/s Random read tput 140 MB/s Random write tput 14 MB/s Rand read access 30 us Random write access 300 us Why are random writes so slow? Erasing a block is slow (around 1 ms) Write to a page triggers a copy of all useful pages in the block Find an used block (new block) and erase it Write the page into the new block Copy other pages from old block to the new block 66

67 SSD Tradeoffs vs RotaRng Disks Advantages No moving parts à faster, less power, more rugged Disadvantages Have the potenqal to wear out MiQgated by wear leveling logic in flash translaqon layer E.g. Intel X25 guarantees 1 petabyte (10 15 bytes) of random writes before they wear out In 2010, about 100 Qmes more expensive per byte ApplicaRons MP3 players, smart phones, laptops Beginning to appear in desktops and servers 67

68 SRAM Storage Trends Metric :1980 $/MB 19,200 2, access (ns) DRAM Metric :1980 $/MB 8, ,000 access (ns) typical size (MB) ,000 8, ,000 Disk Metric :1980 $/MB ,600,000 access (ms) typical size (MB) ,000 20, ,000 1,500,000 1,500,000 68

69 CPU Clock Rates InflecRon point in computer history when procesors (chips) hit the Power Wall :1980 CPU Pentium P-III P-4 Core 2 Core i7 --- Clock rate (MHz) Cycle time (ns) Cores Effective cycle ,000 time (ns) 69

70 The CPU- Memory Gap The gap 100,000, ,000, ,000, ,000.0 between DRAM, disk, and CPU speeds. Disk SSD ns 10, , DRAM Disk seek time Flash SSD access time DRAM access time SRAM access time CPU cycle time Effective CPU cycle time CPU Year 70

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

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

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

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

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

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

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

P6/Linux Memory System Nov 11, 2009"

P6/Linux Memory System Nov 11, 2009 P6/Linux Memory System Nov 11, 2009" REMEMBER" 2! 3! Intel P6" P6 Memory System" DRAM" external system bus (e.g. PCI)" L2" cache" cache bus! bus interface unit" inst" TLB" instruction" fetch unit" L1"

More information

Virtual Memory: Systems

Virtual Memory: Systems Virtual Memory: Systems 5-23: Introduction to Computer Systems 8 th Lecture, March 28, 27 Instructor: Franz Franchetti & Seth Copen Goldstein Recap: Hmmm, How Does This Work?! Process Process 2 Process

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

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

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

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

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

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

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

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

Foundations of Computer Systems

Foundations of Computer Systems 8-6 Foundations of Computer Systems Lecture 5: Virtual Memory Concepts and Systems October 8, 27 8-6 SE PL OS CA Required Reading Assignment: Chapter 9 of CS:APP (3 rd edition) by Randy Bryant & Dave O

More information

Virtual Memory: Systems

Virtual Memory: Systems Virtual Memory: Systems 5-23 / 8-23: Introduc2on to Computer Systems 7 th Lecture, Mar. 22, 22 Instructors: Todd C. Mowry & Anthony Rowe Today Virtual memory ques7ons and answers Simple memory system example

More information

Virtual Memory. Samira Khan Apr 27, 2017

Virtual Memory. Samira Khan Apr 27, 2017 Virtual Memory Samira Khan Apr 27, 27 Virtual Memory Idea: Give the programmer the illusion of a large address space while having a small physical memory So that the programmer does not worry about managing

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

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

Memory System Case Studies Oct. 13, 2008

Memory System Case Studies Oct. 13, 2008 Topics 15-213 Memory System Case Studies Oct. 13, 2008 P6 address translation x86-64 extensions Linux memory management Linux page fault handling Memory mapping Class15+.ppt Intel P6 (Bob Colwell s Chip,

More information

Pentium/Linux Memory System March 17, 2005

Pentium/Linux Memory System March 17, 2005 15-213 The course that gives CMU its Zip! Topics Pentium/Linux Memory System March 17, 2005 P6 address translation x86-64 extensions Linux memory management Linux page fault handling Memory mapping 17-linuxmem.ppt

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

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

NEXT SET OF SLIDES FROM DENNIS FREY S FALL 2011 CMSC313. NEXT SET OF SLIDES FROM DENNIS FREY S FALL 211 CMSC313 http://www.csee.umbc.edu/courses/undergraduate/313/fall11/" The Memory Hierarchy " Topics" Storage technologies and trends" Locality of reference"

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

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

Virtual Memory Input/Output. Admin

Virtual Memory Input/Output. Admin Virtual Memory Input/Output Computer Science 104 Lecture 21 Admin Projects Due Friday Dec 7 Homework #6 Due Next Wed Dec 5 Today VM VM + Caches, I/O Reading I/O Chapter 8 Input Output (primarily 8.4 and

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

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-6-) Timothy Roscoe Herbstsemester 26 AS 26 Virtual Memory 8: Virtual Memory Computer Architecture

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

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition Carnegie Mellon Virtual Memory: Concepts 5-23: Introduction to Computer Systems 7 th Lecture, October 24, 27 Instructor: Randy Bryant 2 Hmmm, How Does This Work?! Process Process 2 Process n Solution:

More information

Virtual Memory Nov 9, 2009"

Virtual Memory Nov 9, 2009 Virtual Memory Nov 9, 2009" Administrivia" 2! 3! Motivations for Virtual Memory" Motivation #1: DRAM a Cache for Disk" SRAM" DRAM" Disk" 4! Levels in Memory Hierarchy" cache! virtual memory! CPU" regs"

More information

Virtual Memory Oct. 29, 2002

Virtual Memory Oct. 29, 2002 5-23 The course that gives CMU its Zip! Virtual Memory Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs class9.ppt Motivations for Virtual Memory Use Physical

More information

Computer Systems. Virtual Memory. Han, Hwansoo

Computer Systems. Virtual Memory. Han, Hwansoo Computer Systems Virtual Memory Han, Hwansoo A System Using Physical Addressing CPU Physical address (PA) 4 Main memory : : 2: 3: 4: 5: 6: 7: 8:... M-: Data word Used in simple systems like embedded microcontrollers

More information

14 May 2012 Virtual Memory. Definition: A process is an instance of a running program

14 May 2012 Virtual Memory. Definition: A process is an instance of a running program Virtual Memory (VM) Overview and motivation VM as tool for caching VM as tool for memory management VM as tool for memory protection Address translation 4 May 22 Virtual Memory Processes Definition: A

More information

Processes and Virtual Memory Concepts

Processes and Virtual Memory Concepts Processes and Virtual Memory Concepts Brad Karp UCL Computer Science CS 37 8 th February 28 (lecture notes derived from material from Phil Gibbons, Dave O Hallaron, and Randy Bryant) Today Processes Virtual

More information

CSE 153 Design of Operating Systems

CSE 153 Design of Operating Systems CSE 53 Design of Operating Systems Winter 28 Lecture 6: Paging/Virtual Memory () Some slides modified from originals by Dave O hallaron Today Address spaces VM as a tool for caching VM as a tool for memory

More information

Virtual Memory: Concepts

Virtual Memory: Concepts Virtual Memory: Concepts Instructor: Dr. Hyunyoung Lee Based on slides provided by Randy Bryant and Dave O Hallaron Today Address spaces VM as a tool for caching VM as a tool for memory management VM as

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 24

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 24 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2018 Lecture 24 LAST TIME Extended virtual memory concept to be a cache of memory stored on disk DRAM becomes L4 cache of data stored on L5 disk Extend page

More information

Motivations for Virtual Memory Virtual Memory Oct. 29, Why VM Works? Motivation #1: DRAM a Cache for Disk

Motivations for Virtual Memory Virtual Memory Oct. 29, Why VM Works? Motivation #1: DRAM a Cache for Disk class8.ppt 5-23 The course that gives CMU its Zip! Virtual Oct. 29, 22 Topics Motivations for VM Address translation Accelerating translation with TLBs Motivations for Virtual Use Physical DRAM as a Cache

More information

CISC 360. Virtual Memory Dec. 4, 2008

CISC 360. Virtual Memory Dec. 4, 2008 CISC 36 Virtual Dec. 4, 28 Topics Motivations for VM Address translation Accelerating translation with TLBs Motivations for Virtual Use Physical DRAM as a Cache for the Disk Address space of a process

More information

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs

Virtual Memory. Motivations for VM Address translation Accelerating translation with TLBs Virtual Memory Today Motivations for VM Address translation Accelerating translation with TLBs Fabián Chris E. Bustamante, Riesbeck, Fall Spring 2007 2007 A system with physical memory only Addresses generated

More information

Lecture 19: Virtual Memory: Concepts

Lecture 19: Virtual Memory: Concepts CSCI-UA.2-3 Computer Systems Organization Lecture 9: Virtual Memory: Concepts Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com Some slides adapted (and slightly modified) from: Clark Barrett

More information

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011

Virtual Memory. CS61, Lecture 15. Prof. Stephen Chong October 20, 2011 Virtual Memory CS6, Lecture 5 Prof. Stephen Chong October 2, 2 Announcements Midterm review session: Monday Oct 24 5:3pm to 7pm, 6 Oxford St. room 33 Large and small group interaction 2 Wall of Flame Rob

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

This lecture. Virtual Memory. Virtual memory (VM) CS Instructor: Sanjeev Se(a

This lecture. Virtual Memory. Virtual memory (VM) CS Instructor: Sanjeev Se(a Virtual Memory Instructor: Sanjeev Se(a This lecture (VM) Overview and mo(va(on VM as tool for caching VM as tool for memory management VM as tool for memory protec(on Address transla(on 2 Virtual Memory

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

Carnegie Mellon. 16 th Lecture, Mar. 20, Instructors: Todd C. Mowry & Anthony Rowe

Carnegie Mellon. 16 th Lecture, Mar. 20, Instructors: Todd C. Mowry & Anthony Rowe Virtual Memory: Concepts 5 23 / 8 23: Introduction to Computer Systems 6 th Lecture, Mar. 2, 22 Instructors: Todd C. Mowry & Anthony Rowe Today Address spaces VM as a tool lfor caching VM as a tool for

More information

Intel P The course that gives CMU its Zip! P6/Linux Memory System November 1, P6 memory system. Review of abbreviations

Intel P The course that gives CMU its Zip! P6/Linux Memory System November 1, P6 memory system. Review of abbreviations 15-213 The course that gives CMU its Zip! P6/Linux ory System November 1, 01 Topics P6 address translation Linux memory management Linux fault handling memory mapping Intel P6 Internal Designation for

More information

Virtual Memory: Concepts

Virtual Memory: Concepts Virtual Memory: Concepts 5-23: Introduction to Computer Systems 7 th Lecture, March 2, 27 Instructors: Franz Franchetti & Seth Copen Goldstein Hmmm, How Does This Work?! Process Process 2 Process n Solution:

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

Intel P6 (Bob Colwell s Chip, CMU Alumni) The course that gives CMU its Zip! Memory System Case Studies November 7, 2007.

Intel P6 (Bob Colwell s Chip, CMU Alumni) The course that gives CMU its Zip! Memory System Case Studies November 7, 2007. class.ppt 15-213 The course that gives CMU its Zip! ory System Case Studies November 7, 07 Topics P6 address translation x86-64 extensions Linux memory management Linux fault handling ory mapping Intel

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

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now? CPS104 Computer Organization and Programming Lecture 18: Input-Output Robert Wagner cps 104.1 RW Fall 2000 Outline of Today s Lecture The system Magnetic Disk Tape es DMA cps 104.2 RW Fall 2000 The Big

More information

CS 153 Design of Operating Systems

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

More information

P6 memory system P6/Linux Memory System October 31, Overview of P6 address translation. Review of abbreviations. Topics. Symbols: ...

P6 memory system P6/Linux Memory System October 31, Overview of P6 address translation. Review of abbreviations. Topics. Symbols: ... 15-213 P6/Linux ory System October 31, 00 Topics P6 address translation Linux memory management Linux fault handling memory mapping DRAM bus interface unit instruction fetch unit processor package P6 memory

More information

VM as a cache for disk

VM as a cache for disk Virtualization Virtual Memory Computer Systems Organization (Spring 2017) CSCI-UA 201, Section 3 Instructor: Joanna Klukowska Virtualization of a resource: presenting a user with a different view of that

More information

Lecture 13. Storage, Network and Other Peripherals

Lecture 13. Storage, Network and Other Peripherals Lecture 13 Storage, Network and Other Peripherals 1 I/O Systems Processor interrupts Cache Processor & I/O Communication Memory - I/O Bus Main Memory I/O Controller I/O Controller I/O Controller Disk Disk

More information

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University EE108B Lecture 17 I/O Buses and Interfacing to CPU Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee108b 1 Announcements Remaining deliverables PA2.2. today HW4 on 3/13 Lab4 on 3/19

More information

Virtual Memory. Spring Instructors: Aykut and Erkut Erdem

Virtual Memory. Spring Instructors: Aykut and Erkut Erdem Virtual Memory Spring 22 Instructors: Aykut and Erkut Erdem Acknowledgement: The course slides are adapted from the slides prepared by R.E. Bryant, D.R. O Hallaron, G. Kesden and Markus Püschel of Carnegie-

More information

CS 153 Design of Operating Systems

CS 153 Design of Operating Systems CS 53 Design of Operating Systems Spring 8 Lectre 6: Paging Instrctor: Chengy Song Slide contribtions from Nael Ab-Ghazaleh, Harsha Madhyvasta and Zhiyn Qian Some slides modified from originals by Dave

More information

Virtual Memory. Alan L. Cox Some slides adapted from CMU slides

Virtual Memory. Alan L. Cox Some slides adapted from CMU slides Alan L. Cox alc@rice.edu Some slides adapted from CMU 5.23 slides Objectives Be able to explain the rationale for VM Be able to explain how VM is implemented Be able to translate virtual addresses to physical

More information

Page Which had internal designation P5

Page Which had internal designation P5 Intel P6 Internal Designation for Successor to Pentium Which had internal designation P5 Fundamentally Different from Pentium 1 Out-of-order, superscalar operation Designed to handle server applications

More information

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory. Chapter 8 1 A Typical collection of I/O devices Interrupts Cache I/O bus Main memory I/O controller I/O controller I/O controller Disk Disk Graphics output Network 2 1 Interfacing s and Peripherals I/O

More information

Virtual Memory II. CSE 351 Autumn Instructor: Justin Hsia

Virtual Memory II. CSE 351 Autumn Instructor: Justin Hsia Virtual Memory II CSE 35 Autumn 27 Instructor: Justin Hsia Teaching Assistants: Lucas Wotton Michael Zhang Parker DeWilde Ryan Wong Sam Gehman Sam Wolfson Savanna Yee Vinny Palaniappan https://xkcd.com/495/

More information

virtual memory Page 1 CSE 361S Disk Disk

virtual memory Page 1 CSE 361S Disk Disk CSE 36S Motivations for Use DRAM a for the Address space of a process can exceed physical memory size Sum of address spaces of multiple processes can exceed physical memory Simplify Management 2 Multiple

More information

Virtual Memory III /18-243: Introduc3on to Computer Systems 17 th Lecture, 23 March Instructors: Bill Nace and Gregory Kesden

Virtual Memory III /18-243: Introduc3on to Computer Systems 17 th Lecture, 23 March Instructors: Bill Nace and Gregory Kesden Virtual Memory III 15-213/18-243: Introduc3on to Computer Systems 17 th Lecture, 23 March 2010 Instructors: Bill Nace and Gregory Kesden (c) 1998-2010. All Rights Reserved. All work contained herein is

More information

Virtual Memory. Physical Addressing. Problem 2: Capacity. Problem 1: Memory Management 11/20/15

Virtual Memory. Physical Addressing. Problem 2: Capacity. Problem 1: Memory Management 11/20/15 Memory Addressing Motivation: why not direct physical memory access? Address translation with pages Optimizing translation: translation lookaside buffer Extra benefits: sharing and protection Memory as

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

Virtual Memory II. CSE 351 Autumn Instructor: Justin Hsia

Virtual Memory II. CSE 351 Autumn Instructor: Justin Hsia Virtual Memory II CSE 35 Autumn 26 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun https://xkcd.com/495/

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

University of Washington Virtual memory (VM)

University of Washington Virtual memory (VM) Virtual memory (VM) Overview and mo-va-on VM as tool for caching VM as tool for memory management VM as tool for memory protec-on Address transla-on Processes Defini=on: A process is an instance of a running

More information

Introduction to Input and Output

Introduction to Input and Output Introduction to Input and Output The I/O subsystem provides the mechanism for communication between the CPU and the outside world (I/O devices). Design factors: I/O device characteristics (input, output,

More information

Chapter 6. I/O issues

Chapter 6. I/O issues Computer Architectures Chapter 6 I/O issues Tien-Fu Chen National Chung Cheng Univ Chap6 - Input / Output Issues I/O organization issue- CPU-memory bus, I/O bus width A/D multiplex Split transaction Synchronous

More information

Chapter Seven Morgan Kaufmann Publishers

Chapter Seven Morgan Kaufmann Publishers Chapter Seven Memories: Review SRAM: value is stored on a pair of inverting gates very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: value is stored as a charge on capacitor (must be

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 = ; c->gals = 7; float mpg = get_mpg(c); free(c); Assembly language: Machine code: get_mpg: pushq movq... popq ret %rbp %rsp, %rbp %rbp Java: Car c = new

More information

UNIT 2 Data Center Environment

UNIT 2 Data Center Environment UNIT 2 Data Center Environment This chapter provides an understanding of various logical components of hosts such as file systems, volume managers, and operating systems, and their role in the storage

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

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

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

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture 1 Last class: Course administration OS definition, some history Today: Background on Computer Architecture 2 Canonical System Hardware CPU: Processor to perform computations Memory: Programs and data I/O

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

Virtual Memory: Concepts

Virtual Memory: Concepts Virtual Memory: Concepts 5-23 / 8-23: Introduc=on to Computer Systems 6 th Lecture, Mar. 8, 24 Instructors: Anthony Rowe, Seth Goldstein, and Gregory Kesden Today VM Movaon and Address spaces ) VM as a

More information

CSE 560 Computer Systems Architecture

CSE 560 Computer Systems Architecture This Unit: CSE 560 Computer Systems Architecture App App App System software Mem I/O The operating system () A super-application Hardware support for an Page tables and address translation s and hierarchy

More information

Understanding the Design of Virtual Memory. Zhiqiang Lin

Understanding the Design of Virtual Memory. Zhiqiang Lin CS 6V8-05: System Security and Malicious Code Analysis Understanding the Design of Virtual Memory Zhiqiang Lin Department of Computer Science University of Texas at Dallas February 27 th, 202 Outline Basic

More information

Virtual Memory II CSE 351 Spring

Virtual Memory II CSE 351 Spring Virtual Memory II CSE 351 Spring 2018 https://xkcd.com/1495/ Virtual Memory (VM) Overview and motivation VM as a tool for caching Address translation VM as a tool for memory management VM as a tool for

More information

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices CS152 Computer Architecture and Engineering Lecture 20: ses and OS s Responsibilities April 7, 1995 Dave Patterson (patterson@cs) and Shing Kong (shing.kong@eng.sun.com) Slides available on http://http.cs.berkeley.edu/~patterson

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University Storage and Other I/O Topics I/O Performance Measures Types and Characteristics of I/O Devices Buses Interfacing I/O Devices

More information

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University Introduction to Computer Architecture Input/Output () Copyright 2012 Daniel J. Sorin Duke University Slides are derived from work by Amir Roth (Penn) Spring 2012 Where We Are in This Course Right Now So

More information

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub.

Buses. Disks PCI RDRAM RDRAM LAN. Some slides adapted from lecture by David Culler. Pentium 4 Processor. Memory Controller Hub. es > 100 MB/sec Pentium 4 Processor L1 and L2 caches Some slides adapted from lecture by David Culler 3.2 GB/sec Display Memory Controller Hub RDRAM RDRAM Dual Ultra ATA/100 24 Mbit/sec Disks LAN I/O Controller

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 25

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2015 Lecture 25 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2015 Lecture 25 LAST TIME: PROCESS MEMORY LAYOUT! Explored how Linux uses IA32! All processes have a similar layout Each process has its own page table structure

More information

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation

@2010 Badri Computer Architecture Assembly II. Virtual Memory. Topics (Chapter 9) Motivations for VM Address translation Virtual Memory Topics (Chapter 9) Motivations for VM Address translation 1 Motivations for Virtual Memory Use Physical DRAM as a Cache for the Disk Address space of a process can exceed physical memory

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 29: Computer Input/Output Adapted from Computer Organization and Design, Patterson & Hennessy, UCB Announcements ECE Honors Exhibition Wednesday, April

More information