+ All Categories
Home > Documents > 02_Memory Organization and Hierarchy

02_Memory Organization and Hierarchy

Date post: 07-Jul-2018
Category:
Upload: fanna786
View: 219 times
Download: 0 times
Share this document with a friend

of 19

Transcript
  • 8/19/2019 02_Memory Organization and Hierarchy

    1/19

    Rehan Azmat

    Lecture 2Memory Organization and Hierarchy

  • 8/19/2019 02_Memory Organization and Hierarchy

    2/19

    The main memory is used to store the

    program and data which are currentlymanipulated by the CPU.

    The secondary memory provides the long- 

    program.

    Before the data and program in the secondarymemory can be manipulated by the CPU, they

    must first be loaded into the main memory.

  • 8/19/2019 02_Memory Organization and Hierarchy

    3/19

    Location

    Capacity Unit of transfer

    Access method

    er ormance Physical type

    Physical characteristics

    Organisation

  • 8/19/2019 02_Memory Organization and Hierarchy

    4/19

    CPU

    Internal External

  • 8/19/2019 02_Memory Organization and Hierarchy

    5/19

    Word size◦

    The natural unit of organisation Word Length

    ◦ 8,16 or 32 bits

  • 8/19/2019 02_Memory Organization and Hierarchy

    6/19

    Internal◦ Usually governed by data bus width

    External◦ Usually a block which is much larger than a word

     ◦ Smallest location which can be uniquely addressed

    ◦ Word internally

    ◦ Cluster on disks

  • 8/19/2019 02_Memory Organization and Hierarchy

    7/19

    Sequential◦ Start at the beginning and read through in order

    ◦ Access time depends on location of data andprevious location

    ◦ e.g. tape

    Direct◦ Individual blocks have unique address

    ◦ Access is by jumping to vicinity plus sequentialsearch

    ◦ Access time depends on location and previouslocation

    ◦ e.g. disk

  • 8/19/2019 02_Memory Organization and Hierarchy

    8/19

    Random◦ Individual addresses identify locations exactly

    ◦ Access time is independent of location or previous access

    ◦ e.g. RAM

    ◦ Data is located by a comparison with contents of a portionof the store

    ◦ Word is accessed based on its contents rather then address

    ◦ Access time is independent of location or previous access

    ◦ e.g. cache

  • 8/19/2019 02_Memory Organization and Hierarchy

    9/19

    Access time◦ Time between presenting the address and getting

    the valid data

    Memory Cycle time◦ Time ma be re uired for the memor to “recover”

    before next access◦ Cycle time is access + recovery

    Transfer Rate◦

    Rate at which data can be moved into or out frommemory unit

  • 8/19/2019 02_Memory Organization and Hierarchy

    10/19

    Semiconductor◦ RAM

    Magnetic◦ Disk & Tape

    ◦ CD & DVD

    Others◦ Bubble

    ◦ Hologram

  • 8/19/2019 02_Memory Organization and Hierarchy

    11/19

  • 8/19/2019 02_Memory Organization and Hierarchy

    12/19

  • 8/19/2019 02_Memory Organization and Hierarchy

    13/19

    Memory bandwidth denotes the amount of data that can beaccessed from a memory per second:

    There are two basic techniques to increase the bandwidth of agiven memory:

    Reduce the memory cycle time

    • Expensive

    • Memory size limitation Divide the memory into several banks, each of which has its

    own control unit.

  • 8/19/2019 02_Memory Organization and Hierarchy

    14/19

  • 8/19/2019 02_Memory Organization and Hierarchy

    15/19

  • 8/19/2019 02_Memory Organization and Hierarchy

    16/19

    What do we need?

    ◦ A memory to store very large programs and to work at a speed

    comparable to that of the CPU. The reality is:

    ◦ the larger a memory, the slower it will be;

    ◦ the faster the memory, the greater the cost/bit.

     

    A solution:◦ To build a composite memory system which combines a small

    and fast memory with a large and slow memory, and behaves(most of the time) like a large fast memory.

    The two level principle above can be extended into a

    hierarchy of many levels. The effectiveness of such a memory hierarchy is based on

    property of programs called the locality of reference.

  • 8/19/2019 02_Memory Organization and Hierarchy

    17/19

    During the course of the execution of aprogram, memory references tend to cluster◦ e.g. Instruction: Loops

    ◦ e.g. Data: arrays

  • 8/19/2019 02_Memory Organization and Hierarchy

    18/19

  • 8/19/2019 02_Memory Organization and Hierarchy

    19/19


Recommended