Random-Access Memory (RAM)

Similar documents
Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

Lecture 9: Memory and Storage Technologies

Memory Basics. SRAM/DRAM Basics

A N. O N Output/Input-output connection

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

1. Memory technology & Hierarchy

Homework # 2. Solutions. 4.1 What are the differences among sequential access, direct access, and random access?

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computer Architecture

Devices and Device Controllers

Price/performance Modern Memory Hierarchy

RAM & ROM Based Digital Design. ECE 152A Winter 2012

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University. (

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

With respect to the way of data access we can classify memories as:

The Central Processing Unit:

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

RAM. Overview DRAM. What RAM means? DRAM

Discovering Computers Living in a Digital World

Chapter 9: Peripheral Devices: Magnetic Disks

Computer Systems Structure Main Memory Organization

Memory. The memory types currently in common usage are:

William Stallings Computer Organization and Architecture 7 th Edition. Chapter 6 External Memory

Algorithms and Methods for Distributed Storage Networks 3. Solid State Disks Christian Schindelhauer

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

System Architecture. CS143: Disks and Files. Magnetic disk vs SSD. Structure of a Platter CPU. Disk Controller...

Memory unit. 2 k words. n bits per word

COS 318: Operating Systems. Storage Devices. Kai Li and Andy Bavier Computer Science Department Princeton University

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Solid State Drive Architecture

Communicating with devices

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

Introduction to I/O and Disk Management

Outline. CS 245: Database System Principles. Notes 02: Hardware. Hardware DBMS Data Storage

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

1. Computer System Structure and Components

To understand how data is processed, by a computer, we can draw a simple analogy between computers and humans.

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Input/output (I/O) I/O devices. Performance aspects. CS/COE1541: Intro. to Computer Architecture. Input/output subsystem.

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

Data Storage - I: Memory Hierarchies & Disks

1 / 25. CS 137: File Systems. Persistent Solid-State Storage

Disk Geometry: How Data is Organized on a Hard Disk Drive

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Chapter 8 Memory Units

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

SDRAM and DRAM Memory Systems Overview

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

Table 1: Address Table

Chapter 13. PIC Family Microcontroller

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Computer Peripherals

Understanding Memory TYPES OF MEMORY

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 5 Storage Devices

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

IDE/ATA Interface. Objectives. IDE Interface. IDE Interface

Here are my slides from lecture, along with my notes about each slide.

Disk Storage & Dependability

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

CHAPTER 7: The CPU and Memory

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

Chapter 11 I/O Management and Disk Scheduling

Computer-System Architecture

Platter. Track. Index Mark. Disk Storage. PHY 406F - Microprocessor Interfacing Techniques

Computer Architecture

Memory Systems. Static Random Access Memory (SRAM) Cell

Configuring Memory on the HP Business Desktop dx5150

Sistemas Operativos: Input/Output Disks

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

Random Access Memory (RAM) Types of RAM. RAM Random Access Memory Jamie Tees SDRAM. Micro-DIMM SO-DIMM

Outline. Principles of Database Management Systems. Memory Hierarchy: Capacities and access times. CPU vs. Disk Speed

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

MICROPROCESSOR AND MICROCOMPUTER BASICS

Floppy Drive & Hard Drive

Storage in Database Systems. CMPSCI 445 Fall 2010

Solid State Technology What s New?

The Classical Architecture. Storage 1 / 36

Chapter 12: Mass-Storage Systems

Features. DDR SODIMM Product Datasheet. Rev. 1.0 Oct. 2011

Lecture 2: Computer Hardware and Ports.

The Bus (PCI and PCI-Express)

Objectives. Units of Memory Capacity. CMPE328 Microprocessors (Spring ) Memory and I/O address Decoders. By Dr.

Chapter 1 Computer System Overview

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Computer Systems Structure Input/Output

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Chapter 12: Secondary-Storage Structure

Transcription:

class12.ppt Memory

Random-Access Memory (RAM) Key features 2 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( 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( DRAM) Each cell stores bit with a capacitor and transistor. Value must be refreshed every 10-100 ms. Sensitive to disturbances. Slower and cheaper than SRAM.

SRAM vs DRAM Summary Tran. Access per bit time Persist? Sensitive? Cost Applications SRAM 6 1X Yes No 100x cache memories DRAM 1 10X No Yes 1X Main memories, frame buffers 3

4

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

Enhanced DRAMs DRAM Cores with better interface logic and faster I/O : Synchronous DRAM (SDRAM) Uses a conventional clock signal instead of asynchronous control Double data-rate synchronous DRAM (DDR SDRAM) Double edge clocking sends two bits per cycle per pin RamBus DRAM (RDRAM) Uses faster signaling over fewer wires (source directed clocking) with a Transaction oriented interface protocol Obsolete Technologies : Fast page mode DRAM (FPM DRAM) Allowed re-use of row-addresses Extended data out DRAM (EDO DRAM) Enhanced FPM DRAM with more closely spaced CAS signals. Video RAM (VRAM) Dual ported FPM DRAM with a second, concurrent, serial interface Extra functionality DRAMS (CDRAM, GDRAM) 6

Nonvolatile Memories Nonvolatile memories retain value even if powered off Read-only memory (ROM): programmed during production Magnetic RAM (MRAM): stores bit magnetically (in development) Ferro-electric RAM (FERAM): uses a ferro-electric dielectric Programmable ROM (PROM): can be programmed once Eraseable PROM (EPROM): can be bulk erased (UV, X-Ray) Electrically eraseable PROM (EEPROM): electronic erase capability Flash memory: EEPROMs with partial (sector) erase capability Uses for Nonvolatile Memories Firmware programs stored in a ROM (BIOS, controllers for disks, network cards, graphics accelerators, security subsystems, ) Solid state disks (flash cards, memory sticks, etc.) Smart cards, embedded systems, appliances Disk caches 7

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 8

Disk Geometry (Muliple-Platter 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 9

Disk Capacity Capacity: maximum number of bits that can be stored. Vendors express capacity in units of gigabytes (GB), where 1 GB = 10^9. 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/in2): 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 10

Computing Disk Capacity Capacity = (# bytes/sector) x (avg. # sectors/track) x Example: 512 bytes/sector (# tracks/surface) x (# surfaces/platter) x (# platters/disk) 300 sectors/track (on average) 20,000 tracks/surface 2 surfaces/platter 5 platters/disk Capacity = 512 x 300 x 20000 x 2 x 5 11 = 30,720,000,000 = 30.72 GB

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. 12

Disk Operation (Multi-Platter View) read/write heads move in unison from cylinder to cylinder arm spindle 13

Disk Access Time Average time to access some target sector approximated by : Taccess = Tavg seek + Tavg rotation + Tavg transfer Seek time (Tavg seek) Time to position heads over cylinder containing target sector. Typical Tavg seek = 9 ms Rotational latency (Tavg rotation) Time waiting for first bit of target sector to pass under r/w head. Tavg rotation = 1/2 x 1/RPMs x 60 sec/1 min Transfer time (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. 14

Disk Access Time Example Given: 15 Rotational rate = 7,200 RPM Average seek time = 9 ms. Avg # sectors/track = 400. Derived: Tavg rotation = 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 + 0.02 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 60 ns Disk is about 40,000 times slower than SRAM, 2,500 times slower then DRAM.

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 formatted capacity and maximum capacity. 16

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 17 disk

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 18 mouse keyboard monitor disk

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 19 mouse keyboard monitor disk

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 20 mouse keyboard monitor disk

21

22

The CPU-Memory Gap The increasing gap between DRAM, disk, and CPU speeds. 23

24

Locality Principle of Locality: 25 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 = 0; for (i = 0; i < n; i++) sum += a[i]; return sum;

Locality Example Question: Can you permute the loops so that the function scans the 3-d 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 = 0; } for (i = 0; i < M; i++) for (j = 0; j < N; j++) for (k = 0; k < N; k++) sum += a[k][i][j]; return sum 26

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. 27

28

An Example Memory Hierarchy Smaller, faster, and costlier (per byte) storage devices L2: L1: L0: registers 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) 29

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. 30

31

32

33

34

35

36

37

38

39

40

41

42

43

44