COMPUTER MEMORY

Memory is required in a computer to store programs and the data processed by programs.
Computer memory is made up of a large number of cells. Each cell is capable of storing one bit of information in the form of binary numbers.
A computer system uses a variety of devices for storing instructions and data required for its operations.
Normally, the information to be stored on a computer is classified in two basic categories:
  1. Data
  2. Instructions
Types of Memory
A memory system can be considered to consist of three types of memories. These are as follows:
  1. Internal processor memories
  2. Primary / main memory
  3. Secondary / auxiliary memory
Any storage unit of a computer may have the following characteristics:
  1. Capacity
    Storage capacity is the amount of information/data a storage unit can hold.
    Accessing the data to/from these memories may be fast or slow.
  2. Speed
    The speed and availability of inexpensive memory has had enormous impact on computer technology.
    The high speed memory devices are more expensive and occupy less space in comparison to the slow speed memory devices.



Internal Processor Memories

These consist of the small set of high-speed registers and high speed buffer memory (cache) which are internal to a processor and are used as temporary locations where actual processing is done.
  1. Register
    Register is a small amount of storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere.
    Processor registers are at the top of the memory hierarchy and provide the fastest way for a CPU to access data.
  2. Basic Registers

  3. Cache Memory
    Cache memory is a small high speed buffer memory used to hold instructions temporarily during processing.
Cache Memory

The important registers, within the CPU are:
  1. Program Counter (PC)
  2. Instruction Register (IR)
  3. Memory Address Register (MAR)
  4. MBR
  5. Acculmular
Besides these, a processor can have many other registers. But these are the most basic and most essential registers necessary for any CPU.

The CPU of a computer system commonly uses cache memory where it holds or buffers the contents of the main memory, because the CPU runs much faster than the main memory.

Thus to reduce the waiting time of the CPU the cache is used.

Cache memory reduces traditional system bottlenecks because system RAM is much slower than CPU.

This prevents the processor from having to wait for a program and data from slower main memory.

A cache typically operates by retaining copies of blocks of storage, each containing recently used information.

This cache is usually transparent or invisible to the processor.





Primary / Main Memory


The primary / main memory is part of the main computer system.
The processor or the CPU directly stores and retrieves information from it.
This memory is accessed by the CPU, in a random fashion.
That means any location of this memory can be accessed by the CPU to either read information from it, or store information in it.

The primary memory itself is implemented by two types of memory technologies.
  1. Random Access Memory (RAM)
    RAM holds temporarily software/program instructions and data before and after processing.
    It is a volatile memory.
    Random Access Memory capacity ranges from 16 MB to 4 GB on personal computers.
    Types of RAM
    1. Static RAM (SRAM) :
      SRAM can provide very high speed.
      SRAM is costly and has low power packing density
      SRAM

    2. Dynamic RAM (DRAM) :
      It has high capacity and power consumption is low.
      The need for refreshing of dynamic RAM because some external refreshing circuits is required.
  2. DRAM

  3. Read Only Memory (ROM)
    Basically, there are two types of ROM :
    1. Manufacturer–Programmed ROM :
      This is one in which the system boot program is stored in it permanently by the manufacturer of the ROM.
    2. User–Programmed ROM :
      Such a ROM is commonly known as PROM (programmable read-only memory), because, a user can program it.
      But once the PROM has been used, user cannot wipe it clean and use it to store something else.
      special types of PROM :
      1. EPROM (Erasable Programmable ROM) :
        It can be erased by exposing it to ultraviolet light
      2. EEPROM (Electrically Erasable Programmable ROM) :
        It can be erased by exposing it to an electrical charge
        Flash EEPROM memory works much faster than traditional EEPROMs
  4. EEPROM

RAM vs ROM
Random Access Memory Read Only Memory
It holds information temporarily. It stores information permanently.
Information is lost when power supply is switched off. Information is not lost even if the computer is switched off.
Known as volatile memory. Known as non-volatile memory.
Holds operating system and application programs which are currently in use. Holds system software such as Boot Loader.



COMPLEMENTARY METAL OXIDE SEMICONDUCTOR MEMORY [CMOS]

Besides RAM and ROM there is a third type of primary memory or storage called as CMOS.
It is used to store the system configuration, date, time and other important data.
When a computer is switched on, BIOS matches the information of CMOS with the peripheral devices and displays error in case there is any mismatch.




Secondary / Auxiliary Memory


Auxiliary memory is much larger in size than main memory but is slower than the latter.
It normally stores system programs and data files. These cannot be accessed directly by the processor.
This, also known as secondary storage, is the memory that supplements the main storage.
This is a long-term, non-volatile memory.

Auxiliary storage device allows a computer to record information semi-permanently. This is to ensure that this information can be read later by the same computer or by another computer.
Auxiliary storage devices are also useful in transferring data or programs from one computer to another.
They also function as backup devices which allows backup of the valuable information that we are working on.

PRIMARY STORAGE vs SECONDARY STORAGE
It is the main memory as part of the CPU. It is auxiliary memory which works under the control of CPU.
It is most expensive. Relatively less expensive than primary memory.
Storage capacity is generally in MB or GB. Storage Capacity is in GB and TB.
Retrieval and processing is very fast. Retrieval and processing is comparatively slower
Based on semi conductor technology. Based on magnetic or optical technology.



SEQUENTIAL & RANDOM AUXILIARY STORAGE DEVICES

Based on the type of data access, sequential and random, auxiliary storage devices can be classified as sequential access media and random media.
In case of sequential access media, data stored in media can only be read in sequence.
To get to a particular point on media, we have to go through all the preceding points.
Magnetic tapes are examples of sequential access media.

In contrast, disks are random access media, also called direct access media, because a disk drive can access any point at random without passing through intervening points.
Other examples of direct access media are magnetic disks, optical disks, etc.


The most common types of auxiliary storage devices are :
  1. Magnetic Media Devices
    Data is stored here by using magnetic field.
  2. Hard Disk
    Floppy Disk
    Magnetic Tape


  3. Optical Media Devices
    Since data stored digitally on a disk is read and written by laser beam, it is called optical media.
  4. CD
    DVD
    Blu-ray


  5. Solid State Devices
    Since these devices contain solid parts and does not contain moving parts they are called Solid State Devices.
SSD
USB Flash Drive
Memory Card





1 2 3 4 5 6 7