Computer Memory

Hello Readers In the very first slide we have discussed RAM and ROM computer memory in very breaf ,lets discuss here in some what more detail.

As we already know The computer memories can be divided into following categories:

  1. Primary Memory
  2. Secondary memory
  3. Cache Memory

Primary Memory
Primary memory or main memory is a Metal Oxide Semiconductor (MOS) memory used for storing program and data during the execution of the program. It is directly accessible to CPU.

Broadly primary memory can be of two types – RAM (Random Access Memory) and ROM (Read only memory).

Random Access Memory (RAM)
In case of RAM, the memory can be accessed from any desired location randomly.
It is a read/write memory, so data can be both read from and written to the RAM.
It is a volatile memory and loses its contents when the power is switched off or interrupted.

RAM can be broadly classified into two categories: Dynamic RAM (DRAM) and Static RAM (SRAM).

Dynamic RAM (DRAM): It consists of a transistor and a capacitor that stores electric charge. The DRAMs are physically smaller, cheaper and slower memories. They are slower because the data stored in them needs to continuously refreshed and this consumes lot of processor time. Each refresh operation takes several CPU cycles to
complete. This is because a capacitor tends to loose charge over a period of time which needs to be refreshed again and again. DRAM is used in primary storage areas and is available in various forms as EDORAM (Extended Data Output RAM), SDRAM (Synchronous DRAM) and DDR SDRAM.

Static RAM: This type of RAM is large in physical size but is an expensive and faster memory. It is faster because it is made up of flip flops to store data and these flip flops do not require any refreshing. Static RAM is also volatile and is easier to use as compared to dynamic RAM. These are used in specialized applications.

Read only memory (ROM)
As the name suggests, a ROM is a type of memory that can perform read operation only. The contents of ROM are written by the manufacturer and come along with the computer. We cannot change its contents or write something else on it.

DataInstructions that are needed to start the computer are also stored in the ROM. ROMs are slower as compared to RAMs and are available in various types –

  1.  Programmable Read Only Memory (PROM): This type of ROM can be programmed even after its manufacture using a PROM programmer circuit. But once a PROM is programmed, it becomes just like ROM i.e. it cannot be changed.
  2. Erasable Programmable Read Only Memory (EPROM): In this type of ROM, the
    contents can be erased and the memory can be reprogrammed. To erase the data, an EPROM is exposed to ultraviolet light and then it can be reprogrammed using a PROM programmer circuit. When the EPROM is in use, then it behaves like a ROM, that means the information can only be read.
  3. Electrically Erasable Programmable Read Only Memory (EEPROM): The contents of this type of ROM can be erased and then reprogrammed using electric signals. This makes it an excellent back up for RAM whose contents are lost when the power is switched off. When the power is returned, the contents of EEPROM
    are copied back into the RAM and the computer continues working without any data loss. Nowadays RAMs and EEPROMs are integrated in a single chip.

Cache Memory
Cache memory is a special high speed memory made up of high speed static RAMs. It is used to hold frequently accessed data and instructions. We know that the processing speed of CPU is much more than the main memory access time of the computer. This means the CPU has to wait for a substantial amount of time. Alternatively we have the cache memory which is a small, expensive but fast memory that is placed between the CPU and the main memory. Whenever some data is required, the CPU first looks into  cache. If data is found , we call it a cache hit and the information is transferred to the CPU. In case of a miss, the main memory is accessed.

Memory caching proves to be efficient because most programs repeatedly access the same data and instructions, so access of frequently used data becomes very fast with cache memory.

There are two types of cache memory:

  1.  L1 cache: It is small and is built inside the CPU. It is fast as compared to L2 cache
  2.  L2 cache: It is large but slower and is mounted on the motherboard

we have already Discussed Secondary memory in the very first slide ,so we are omitting the Secondary memory discussion here.

Try Now – Online Tests For Computer fundamentals