secondary storage

Upload: maadurim

Post on 18-Oct-2015

4 views

Category:

Documents


0 download

DESCRIPTION

hiiiiiiiiiiiii

TRANSCRIPT

  • 5/28/2018 Secondary Storage

    1/214/3/2014Department of Information

    Technology 1

    Secondary Storage

    CS1251Computer Organization

    Carl Hamacher

  • 5/28/2018 Secondary Storage

    2/21

    4/3/2014 Department of Information Technology 2

    Virtual Memory (VM)

    Processor address space greater than physical main

    memory (RAM)

    32-bit address = 4G bytes

    Secondary storage (magnetic disk)

    Virtual (logical) addresses translated into physical

    addresses

    Memory Management Unit (MMU)

  • 5/28/2018 Secondary Storage

    3/214/3/2014 Department of Information Technology 3

    VM Organization

    Processor

    Cache

    Main Memory

    Disk Storage

    MMU

    Virtual Address

    Physical Address

    Physical Address

    DMA Transfer

    Data

    Data

  • 5/28/2018 Secondary Storage

    4/214/3/2014 Department of Information Technology 4

    Cache vs. Virtual Memory

    Cache Memory

    Bridges speed gap between processor and main memory

    Implemented in hardware

    Virtual Memory Bridges size and speed gaps between main memory and

    secondary storage

    Implemented (in part) by software (operating system)

  • 5/28/2018 Secondary Storage

    5/214/3/2014 Department of Information Technology 5

    VM Address Translation

    Pages

    Fixed-length units

    Blocks of words that occupy contiguous

    locations in main memory

    Commonly 2K to 16K bytes

    Too smallmore (slow) accesses

    Too largeunnecessary info in main memory

  • 5/28/2018 Secondary Storage

    6/214/3/2014 Department of Information Technology 6

    VM Address Translation

    Virtual Page Number

    High-order bits

    Which page

    Offset Low-order bits

    Word within page

    Control Bits

    Validity

    Modification

    Restrictions (read/write)

  • 5/28/2018 Secondary Storage

    7/214/3/2014 Department of Information Technology 7

    VM Address Translation

    Page Table

    Info about main memory location of each page

    Kept in main memory

    MMU cache for most recently accessed pages Page Frame

    Area of main memory that can hold one page

    Page Table Base Register

    Starting address of page table

  • 5/28/2018 Secondary Storage

    8/214/3/2014 Department of Information Technology 8

    VM Address Translation

  • 5/28/2018 Secondary Storage

    9/214/3/2014 Department of Information Technology 9

    Memory Management

    Operating System

    System Space

    Supervisor State

    Privileged Instructions Application Programs

    User Space

    User State

    Protection

    No program should be allowed to destroy either data or

    instructions of another program

  • 5/28/2018 Secondary Storage

    10/214/3/2014 Department of Information Technology 10

    Magnetic Hard Disks

    Phase Encoding (Manchester Encoding)

    Change in magnetization guaranteed at midpoint of each

    bit

    Provides clocking info for synchronization Other self-clocking schemes

    More efficient

    Better storage density

    More complex control circuitry

  • 5/28/2018 Secondary Storage

    11/214/3/2014 Department of Information Technology 11

    Hard Disk Components

    Disk

    Assembly of disk platters

    Disk Drive

    Electromechanical system Spins disk

    Moves read/write heads

    Disk Controller

    Electronic circuitry

  • 5/28/2018 Secondary Storage

    12/214/3/2014 Department of Information Technology 12

    Hard Disk Organization

    Organization of data

    Concentric tracks

    Divided into sectors

    Divided into logical partitions Formatting

    Divides disk into tracks and sectors

    Excludes defective sectors

    About 15% overhead

    Sector headers

    Error-correction codes

    Intersector gaps

  • 5/28/2018 Secondary Storage

    13/214/3/2014 Department of Information Technology 13

    Access Time

    Seek Time

    Time required to move the read/write head to the proper

    track

    Latency Time Rotational delay

    Time until head is over correct track

    Times measured in ms

  • 5/28/2018 Secondary Storage

    14/214/3/2014 Department of Information Technology 14

    Disk Controller

    Data Buffer

    Difference in transfer rates between disk and bus

    Also serves as a disk cache

    Read/Write Requests Main memory addressdisk address

    Word count

    Booting

    OS loaded into main memory

    Nonvolatile ROM stores monitor program

    Boot block with loader program

  • 5/28/2018 Secondary Storage

    15/214/3/2014 Department of Information Technology 15

    RAID

    Redundant Array of Inexpensive Disks

    RAID 0

    Performance enhancement

    Single large file stored in several separate disk units Disks deliver data in parallel

    RAID 1

    Relaibility

    Storing identical copies of data on two disks

    Mirror

  • 5/28/2018 Secondary Storage

    16/214/3/2014 Department of Information Technology 16

    RAID

    RAID 2, RAID 3, RAID 4

    Reliability

    Various parity checking schemes

    RAID 5 Reliability

    Parity-based error-recovery scheme

    Distributed across disks

    RAID 10

    Performance and reliability

    Hybrid of RAID 0 and RAID 1

  • 5/28/2018 Secondary Storage

    17/214/3/2014 Department of Information Technology 17

    Optical Disks

  • 5/28/2018 Secondary Storage

    18/214/3/2014 Department of Information Technology 18

    CD vs. DVD

    Compact Disk (CD)

    CD-ROM

    CD-R

    CD-RW Digital Versatile Disk (DVD)

    Shorter wavelength laser

    Smaller focus, smaller pits, closer tracks

    Capacity

    CD = 800 MB

    DVD = 4.7 GB

  • 5/28/2018 Secondary Storage

    19/214/3/2014 Department of Information Technology 19

    Magnetic Tape Systems

    Off-line storage of large amounts of data

    Back-up and archival storage

    Data organized into records and files

    Highest capacity

    Slowest

    Cheapest

  • 5/28/2018 Secondary Storage

    20/214/3/2014 Department of Information Technology 20

    Memory Hierarchy

    Processor

    Registers

    Primary Cache

    Secondary Cache

    Main Memory

    Secondary Memory

    Increasing

    Size

    Increasing

    Speed

    Increasing

    Cost

  • 5/28/2018 Secondary Storage

    21/21

    4/3/2014 Department of Information Technology 21

    Questions?