What is Computer Memory
Computer memory is the physical device which is used to store data or information on a temporary or permanent basis. In computer field, the term computer memory refers to RAM i.e. the main memory. There are other memory devices too which includes external memory (e.g. pen drive).
Types of Memory Devices are:
Internal Memory / Main Memory
It is a semi-conductor memory used for storing programs as well as data using programs execution. It is directly accessible to the CPU.
It is divided into three types:
RAM (Random Access Memory):
It is called Random Access Memory because any location on the memory can be randomly selected and used directly to store and retrieve data or information. It is both read and write memory. It is a volatile memory (because of the fact that it destroys its contents when power is switched off.
It is also of two types:
a)SRAM (Static RAM) – the re-generable circuits are not available. It is faster than DRAM and is less volatile, but SRAM requires more power supply and is a bit more expensive.
b)DRAM (Dynamic RAM) – has re-generable circuits/can refresh the storage charge. It has to be constantly refreshed or will lose its contents.
ROM (Read Only Memory)
It is called Read Only Memory in the sense that the data is placed in the ROM at the time of its manufacture and cannot be changed thereafter. It is read only Memory. (I.e. cannot be written into the memory) It is non-volatile memory.
ROM is of three types:
a)PROM (Programmable Read Only Memory): The data is erased by special programs.
b)EPROM (Erasable PROM): Data is erased by exposing the chip under ultra violet light.
c)EEPROM (Electrically Erasable PROM): Data is erased by passing electrical signals.
It is a high speed buffer between the CPU and the Main Memory. The CPU consults the Cache and when it cannot find the instructions, it looks into Main Memory.
Advantages of Cache memory:
Faster accessing of data. No time is wasted in retrieving the data for the primary or secondary memory.
Virtual Memory acts as an alternative to RAM. In this, all the physical memory is controlled by the operating system so that whenever the program needs memory, the request is sent to the operating system and then the operating system decides the location where the memory can be placed in.