ashur

download ashur

of 22

Transcript of ashur

  • 7/31/2019 ashur

    1/22

  • 7/31/2019 ashur

    2/22

    Memory The memory unit is an essential component in any

    digital computer since it is needed for storing

    programs and data CPU needs faster memory to process data.

    Not all accumulated information is needed by theCPU at the same time

    Therefore, it is more economical to use low-coststorage devices to serve as a backup for storing theinformation that is not currently used by CPU

  • 7/31/2019 ashur

    3/22

    Computer Memory: types Primary Storage Secondary Storage

    Evolution of Manand Storage

  • 7/31/2019 ashur

    4/22

    Memory Types The memory unit that directly communicate with

    CPU is called the main memory Devices that provide backup storage are called

    auxiliary memory

    The memory hierarchy system consists of allstorage devices employed in a computer system

    from the slow by high-capacityauxiliarymemoryto a relatively faster main memory, to an evensmaller and faster cache memory

  • 7/31/2019 ashur

    5/22

    Memory hierarchy

    Register

    Cache

    Main Memory

    Magnetic Disk

    Magnetic Tape

    Memory Hierarchy is to obtain the highest possible access speed whileminimizing the total cost of the memory system

    Kilobyte

    Megabyte

    Gigabyte

    Terabyte Petabyte

    Exabyte

    Zettabyte

  • 7/31/2019 ashur

    6/22

    Primary Storage Primary storageor main memorystores three

    types of information for very brief periods oftime:

    Data to be processed by the CPU; Instructions for the CPU as to how to process

    the data;

    Operating system programs that manage

    various aspects of the computers operation. Primary storage takes place in chips mounted on

    the computers main circuit board, called themotherboard.

  • 7/31/2019 ashur

    7/22

    Main Types of Primary Storage Registers

    Random access memory (RAM)

    Cache memory Read-only memory (ROM)

    Register RAMCache

  • 7/31/2019 ashur

    8/22

    Cache memory If the active portions of the program and data

    are placed in a fast small memory, the averagememory access time can be reduced,

    Thus reducing the total execution time of theprogram

    Such a fast small memory is referred to ascache memory

    The cache is the fastest component in thememory hierarchy and approaches the speed ofCPU component

    The typical access time ratio between cache and

    main memory is about 1 to 7

  • 7/31/2019 ashur

    9/22

    Cache memory Mapping The basic characteristic of cache memory is its fast access

    time,

    Therefore, very little or no time must be wasted when

    searching the words in the cache The transformation of data from main memory to cache

    memory is referred to as a mapping process, there arethree types of mapping: Associative mapping

    Direct mapping

    Set-associative mapping

  • 7/31/2019 ashur

    10/22

    The operation of cache memory

    1. Cache fetches data

    from next to currentaddresses in mainmemory

    2. CPU checks to seewhether the nextinstruction it requires is incache

    3. If it is, then theinstruction is fetched from

    the cache a very fastposition

    4. If not, the CPU has to

    fetch next instructionfrom main memory - amuch slower process

    Main

    Memory

    (DRAM)

    CPU

    Cache

    Memory

    (SRAM)

    = Bus connections

  • 7/31/2019 ashur

    11/22

    HIT / MISS concept

    The performance of cache memory is frequentlymeasured in terms of a quantity called hit ratio

    When the CPU refers to memory and finds the word in

    cache, it is said to produce a hit Otherwise, it is a miss

    Hit ratio = hit / (hit+miss)

  • 7/31/2019 ashur

    12/22

    Types of main memory

    There are two types of main memory, Random Access Memory (RAM) and ReadOnly Memory (ROM)

    Random Access Memory (RAM)

    holds its data as long as the computer is switched on

    All data in RAM is lost when the computer is switched off

    Described as being volatile

    It is direct access as it can be both written to or read from in any order

    Its purpose is to temporarily hold programs and data for processing. Inmodern computers it also holds the operating system

  • 7/31/2019 ashur

    13/22

    Random-Access Memory (RAM)

    Static RAM (SRAM)

    Each cell stores bit with a six-transistor circuit.

    Retains value indefinitely, as long as it is kept powered.

    Dynamic RAM (DRAM) Each cell stores bit with a capacitor and transistor.

    Value must be refreshed every 10-100 ms.

    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

  • 7/31/2019 ashur

    14/22

    ROMROM holds programs and data permanently even when computer is switched off

    Data can be read by the CPU in any order so ROM is also direct access

    The contents of ROM are fixed at the time of manufacture

    Stores a program called the bootstrap loader that helps start up the computer

    Access time of between 10 and 50 nanoseconds

  • 7/31/2019 ashur

    15/22

    Types of ROM

    1. Programmable Read Only Memory (PROM)

    Empty of data when manufactured

    May be permanently programmed by the user

    2. Erasable Programmable Read Only Memory (EPROM)

    Can be programmed, erased and reprogrammed

    The EPROM chip has a small window on top allowing it to be erased by shining ultra-violet light on it

    After reprogramming the window is covered to prevent new contents being erased

    Access time is around 45 90 nanoseconds

    3. Electrically Erasable Programmable Read Only Memory (EEPROM)

    Reprogrammed electrically without using ultraviolet light

    Must be removed from the computer and placed in a special machine to do this

    Access times between 45 and 200 nanoseconds

  • 7/31/2019 ashur

    16/22

    Secondary Storage

    Memory capacity that can store very large amounts ofdata for extended periods of time.

    Magnetic tape (sequential access)

    Magnetic disks (direct access)

    Secondary Storage:It is nonvolatile.

    It takes much more time to retrieve data because of the electromechanical innature.It is cheaper than primary storage.Auxiliary memory access time is usually 1000 times that of main memory

  • 7/31/2019 ashur

    17/22

    Magnetic Tape

    Magnetic tape: A secondary storagemedium on a large open reel or in asmaller cartridge or cassette.

    Sequential access: Data access in whichthe computer system must run throughdata in sequence in order to locate a

    particular piece of data.

  • 7/31/2019 ashur

    18/22

    Hard DriveHard drives: A form of secondarystorage that stores data on plattersdivided into concentric tracks andsectors, which can be read by aread/write head that pivots across therotating disks.

  • 7/31/2019 ashur

    19/22

    Optical Storage Devices

    Compact Disk, Read-Only Memory (CD-ROM)

    Digital Video Disk (DVD)

    Blu-ray disc

    VS

    The Winner

    Direct access: Data access in which any piece of data be retrieved in a nonsequential manner by locating it using the datas address.

  • 7/31/2019 ashur

    20/22

    Uses backing storage e.g. hard disk as a temporary location for programsand data where insufficient RAM available

    Swaps programs and data between the hard-disk and RAM as the CPUrequires them for processing

    A cheap method of running large or many programs on a computer system

    Cost is speed: the CPU can access RAM in nanoseconds but hard-disk inmilliseconds (Note: a millisecond is a thousandth of a second)

    Virtual memory is much slower than RAM

    Virtual memory

  • 7/31/2019 ashur

    21/22

    TERMS : Memory

    Main memory consists of a number ofstorage locations, each of which isidentified by a unique address

    The ability of the CPU to identifyeach location is known as itsaddressability

    Each location stores a word i.e. thenumber of bits that can be processedby the CPU in a single operation.Word length may be typically 16, 24,32 or as many as 64 bits.

    The access time = seek time + transfer timeSeek time: required to position the read-write head to a location

    Transfer time: required to transfer data to or from the device

    The average time required toreach a storage location inmemory and obtain its contents

    is called the access time

  • 7/31/2019 ashur

    22/22

    http://anujp.pptx/