The Main Memory by yaoyufang

VIEWS: 9 PAGES: 22

									Lecture-11, 12



           The Main Memory




2-May-10     Lafifa Jamal, CSE, DU.   1
Classification of Memory
    Internal Processor Memory
    Main Memory
           RAM, ROM.
    Secondary Memory
           Hard Drive, CD, Floppy etc.




2-May-10                 Lafifa Jamal, CSE, DU.   2
Memory Capacity
    Bit
    Byte: 1 byte= 8 bits
    Kilobyte (K or KB): 1KB=1024 bytes
    Megabyte (M or MB): 1MB=1024 KB
    Gigabyte (G or GB): 1GB=1024 MB
    Terabyte (T or TB): 1 TB = 1024 GB




2-May-10           Lafifa Jamal, CSE, DU.   3
Memory Hierarchy




2-May-10    Lafifa Jamal, CSE, DU.   4
Main Memory
    The storage device used by a computer to hold the
    currently executing program and its working data.
    Also known as Primary Memory.
    It is a temporary storage area.
    Physically, this memory consists of some chips either on
    the motherboard, or on a small circuit board attached to
    the motherboard.
    It allows the CPU to store and retrieve data very quickly
    than secondary memory.
    The rate of fetching data from the main memory is about
    100 times faster than that from a high-speed secondary
    storage.

2-May-10                Lafifa Jamal, CSE, DU.             5
Storage Evaluation Criteria
    Storage capacity
           It is the amount of data, which can be stored in
           the storage unit.
             Higher Capacity is desired.


    Access time
           This is the time required to locate and retrieve
           stored data from the storage unit, in response to
           a program instruction.
             Faster access time is preferred.


2-May-10                  Lafifa Jamal, CSE, DU.              6
Storage Evaluation Criteria
    Cost per bit of storage
           This is the cost of a storage unit for a given
           storage capacity.
             Lower cost is desirable.


    Random Access
           If the time taken to access data from the
           storage unit is independent of the location of the
           data in the storage unit, it is called random
           access storage.


2-May-10                   Lafifa Jamal, CSE, DU.           7
Storage Evaluation Criteria
    Volatile
           If the storage unit can retain the data stored in
           it, even when the power is turned off or
           interrupted, it is called non-volatile storage.
           If the data stored are lost, when the power is
           turned off or interrupted, it is called volatile
           storage.
             Non-volatile storage is desirable.
             Primary storage units are volatile and the
             secondary storage units are non-volatile.



2-May-10                  Lafifa Jamal, CSE, DU.               8
Types of Main Memory
    Random Access Memory (RAM)




    Read only Memory (ROM)




    Cache Memory

2-May-10           Lafifa Jamal, CSE, DU.   9
Random Access Memory
    Temporary storage that can be read from or
    written into by the user.
    Used primarily to store user programs and
    data.
    Temporary or Volatile memory.
    Every location can be accessed independently.
    Access time for every location is constant and
    independent of it’s position.
    Types of RAM:
           Static RAM (SRAM)
           Dynamic RAM (DRAM)

2-May-10               Lafifa Jamal, CSE, DU.    10
Factors Effecting Processing Speed -
RAM
    The amount of RAM in a PC has a direct affect
    on the system's speed.
    The more RAM a PC has, the more program
    instructions and data can be held in memory,
    which is faster than storage on disk.
    If a PC does not have enough memory to run a
    program, it must move data between RAM and
    the hard disk frequently. This process, called
    swapping, can greatly slow a PC's
    performance.

2-May-10            Lafifa Jamal, CSE, DU.       11
Static RAM
    SRAM stands for static RAM.
    Characterized by high speed and high cost.
    Does not require refreshing.
    Generally used by cache.
    Control complexity is less.
    Use six transistors to store data.




2-May-10            Lafifa Jamal, CSE, DU.       12
Dynamic RAM
    DRAM stands for Dynamic RAM.
    Relatively slower and low cost memory.
    Requires refreshing periodically.
    Used for main memory.
    Relatively high control complexity.
    Uses one transistor and one capacitor to store
    a single bit.
    Allows higher density.



2-May-10            Lafifa Jamal, CSE, DU.           13
Read Only Memory
    A class of storage used in computer and other
    electronic devices.
    Data stored in it cannot be modified.
    Non-volatile memory.
    Types of ROM
           ROM (Strict ROM)
           PROM
           EPROM
           EEPROM


2-May-10                Lafifa Jamal, CSE, DU.      14
Use of ROM
    Every computer requires a storage to store
    initial program to run when it is powered on
    (known as bootstrapping or booting up).
    In modern PCs, ROM is used to store the basic
    bootstrapping firmware for the main processor,
    as well as the various firmware needed to
    internally control self contained devices such as
    graphics card, hard disks, DVD drives, etc.
    ROM are prevalent in embedded system.



2-May-10             Lafifa Jamal, CSE, DU.        15
Strict ROM
    Read Only Memory.
    Used for storing programs & data permanently.
    User may read data from ROM but cannot write
    on ROM.
    Permanent and Nonvolatile memory.
    Manufacturer writes data on it. Cannot be
    changed after that.




2-May-10           Lafifa Jamal, CSE, DU.      16
Programmable Read Only Memory
(PROM)
    Can be written to or programmed via a
    special device called a PROM programmer.
    Typically, this device uses high voltages to
    permanently destroy or create internal links
    (fuses or antifuses) within the chip.
    A PROM can only be programmed once.
    The difference with ROM is that it is
    programmed after the device is constructed.




2-May-10            Lafifa Jamal, CSE, DU.         17
Erasable Programmable ROM (EPROM)
    Can be erased by exposure to strong ultraviolet
    light (typically for 10 minutes or longer), then
    rewritten with a process that requires
    application of higher voltage.
    Repeated exposure to UV light will eventually
    wear out an EPROM, but the endurance of most
    EPROM chips exceeds 1000 cycles of erasing
    and reprogramming.
    EPROM chip packages can often be identified
    by a quartz window which allows UV light to
    enter.
2-May-10            Lafifa Jamal, CSE, DU.        18
Electrically Erasable Programmable
ROM (EEPROM)
    Allows its entire or partial contents to be
    electrically erased, then rewritten electrically,
    so that they need not be removed from the
    computer (or camera, MP3 player, etc.).
    Writing is much slower than reading from a
    ROM.




2-May-10              Lafifa Jamal, CSE, DU.            19
Flash Memory
    Modern type of EEPROM invented in 1984.
    Flash memory can be erased and rewritten
    faster than ordinary EEPROM, and newer
    designs feature very high endurance
    (exceeding 1,000,000 cycles).
    Some variations of Flash memory Makes
    efficient use of silicon chip area, resulting in
    individual ICs with a capacity as high as 16 GB.
    This feature, along with its endurance and
    physical durability, has allowed flash to replace
    magnetic storage in some applications (such as
    USB Flash Drives).
2-May-10             Lafifa Jamal, CSE, DU.        20
Cache Memory
    System performance suffers when processor
    waits for data from slow memory device.
    Cache memory is introduced between the CPU
    and the main memory.
    Cache is a high speed memory for holding
    recently accessed data in main memory.

           CPU                               Main
                     Cache
                                            Memory




2-May-10           Lafifa Jamal, CSE, DU.            21
Cache Memory
    The amount of cache memory has a
    tremendous impact on the computer's speed.
    Two types of cache:
           Level-1 L1 cache: CPU resident cache
           Level-2 L2 cache: Motherboard resident cache.




2-May-10                 Lafifa Jamal, CSE, DU.            22

								
To top