Memory
Memory
Definition:
It is a subsystem of digital processing system which can store unprocessed, partially processed data
& result is called as Memory.
There are mainly two types of memory in a computer – Primary memory and Secondary memory.
Primary memory refers to a set of memory units within the computer, CPU has direct access to
and it stores instruction and data needed for processing by CPU. Primary memory stores the
intermediate results and final results of the processing before it is stored in the permanent
storage. Some of this memory is volatile i.e. contents stored will get erased if power is switched off
and some of them are non-volatile i.e. contents cannot be erased. Primary memory is also known as
Main memory or Internal memory.
A program has a set of instructions in a logical sequence and it has to process the data using the
instructions in the program and produce the result.
Program and data are stored in the secondary storage i.e. External hard disks.
Primary memory picks up the relevant portion of the memory called “page” and the related data and
stores them in the main memory and control unit of the CPU loads instruction after instruction and
the corresponding data in the register memory for CPU to process and produce a result.
1. Main Memory
The size of Main memory is the largest when compared to Cache Memory and Register memory but
the cost is the lowest among them. Main memory can be divided into two main types viz.,
Random Access Memory (RAM), Read-only memory (ROM), and each of these is divided into further
sub-types.
The data from RAM is read directly in random access mode using memory addresses irrespective
of its length 16/32/64 bits. Hence the data can be accessed from RAM at a faster rate than external
hard disk and CPU normally takes 10 nanoseconds to read from RAM. Each and every location in
RAM is identified uniquely by an address and hence the instructions or data stored in it are
referred by the processor and these addresses are stored in CPU registers during the runtime.
DRAM: DRAM (Dynamic Random-Access Memory) is a type of RAM that is used for the dynamic
storage of data in RAM.
In DRAM, each cell carries one-bit information. The cell is made up of two parts: a capacitor and
a transistor. The size of the capacitor and the transistor is so small, requiring millions of them
to store on a single chip. Hence, a DRAM chip can hold more data than an SRAM chip of the same
size. However, the capacitor needs to be continuously refreshed to retain information because
DRAM is volatile. If the power is switched off, the data store in memory is lost.
SRAM: SRAM (Static Random-Access Memory) is a type of RAM used to store static data in the
memory. It means to store data in SRAM remains active as long as the computer system has a power
supply. However, data is lost in SRAM when power failures have occurred
2. Read-only Memory (ROM)
ROM is a memory device or storage medium that is used to permanently store information inside a
chip. It is a read-only memory that can only read stored information, data or programs, but we
cannot write or modify anything. A ROM contains some important instructions or program data that
are required to start or boot a computer. It is a non-volatile memory; it means that the stored
information cannot be lost even when the power is turned off or the system is shut down.
The process of entering information is done outside the system where it is used. This type of
memory is used to store fixed tables of functions etc.
These memories are further classified on the basis of technique employed in storing information
into the memory or their erasable properties.
Mask-Programmed ROM – It derives this name because the information is written to this type of
ROM at the time of manufacture by applying a suitable mask. Once the manufacturer writes this
type of ROM, it cannot be possible to change this information even by the manufacturer. So that the
information entered is permanent. It is cheap with compared to the other types of ROMs when the
cost per unit quantity is considered. But the user has to place an order for a huge number at a time.
Thus, ROMs are used in equipment that is produced in huge quantities. To give an analogy, mask-
programmed ROMs are compared to books that are printed in huge volumes.
Programmable Read Only Memory(PROM) – The user writes information to this type of ROM
with the help of PROM programmer equipment. Once the user writes this type of ROM, it cannot be
possible to change this information anymore. Like Mask-Programmed ROM, the information entered
is permanent. Though itis cheaper than the other types of ROMs but it is costlier than a mask ROM.
The user can buy even a single piece of PROM from a local shop. Thus, PROMs are implemented in
equipment those are produced in small quantities.
Erasable Programmable Read Only Memory (EPROM) – Information is written to this type of
ROM by the user with the help of EPROM programmer equipment. As its content is erasable and
rewritable, so the user can change this information in a number of times. Thus, although the
information entered is not lost when power is switched off, it can be possible to erase it and then
write new information. With the exposure of strong ultraviolet (UV) light from a very close distance
on the quartz window of the EPROM chip, we can erase the content of the EPROM. Then the
contents of the entire EPROM are entirely lost. The user can purchase even a single piece of EPROM
from the market read and write its content for several numbers of times as well.
Electrically erasable (or Alterable) Programmable Read Only Memory (EEPROM or
EEPROM) –
Information has been written to this type of ROM by the user with the help of EPROM programmer
equipment. After the user writes this type of ROM, it can be possible to change this information a
number of times. Thus although the information entered is not lost at the time of power is switched
off, it can be possible to erase it and then write new information. Unlike EPROM where erasing of
data is to be done using ultra Violet rays, but in the case of EEPROM, erasing of its content is done
with the help of electrical signals. Also, the contents of the EEPROM can be erased selectively. It
is costlier than the other types of ROMs and is gaining in popularity.
2. Cache Memory
Frequently addressed Instructions and data are stored in an exclusive faster memory in CPU to
avoid waste effort and time to bring it from slow main memory. Such storage is called Cache
memory and its size is in the range of 2KB to 64KB. The size of this memory is much lower than the
main memory and cost is higher than the main memory but lesser than the Resisters.
3. Register Memory
Registers as part of CPU, are used to hold the memory addresses of the data, next instruction, and
intermediate results during the program execution. It also acts as transit storage between the main
memory and the Processor. It is the costliest of all the memory and size-wise it is the smallest.
Conclusion
Primary memory plays a critical role in the execution of the program. Any improvements in memory
operations will lead to faster execution of the program and in turn, enhance business operation
efficiency. Continuous improvisations keep on taking place in this area to meet the expectations of
the Digital world.
RAM ROM
Read and write operations can be performed. Only Read operation can be performed.
Data can be lost in volatile memory when the Data cannot be lost in non-volatile memory
power supply is turned off. when the power supply is turned off.
Storage data requires to be refreshed in RAM. Storage data does not need to be refreshed in
ROM.
The size of the chip is bigger than the ROM chip to The size of the chip is smaller than the RAM chip
store the data. to store the same amount of data.
Types of RAM: DRAM and SRAM Types of ROM: MROM, PROM, EPROM, EEPROM
A RAM chip can store multiple GB (gigabytes) of A ROM chip stores several MB (megabytes) of
data, ranging from 1 to 256 GB per chip. data, usually 4 to 8 MB per chip.
Secondary Memory
Primary memory has limited storage capacity and is volatile. Secondary memory overcome this
limitation by providing permanent storage of data and in bulk quantity. Secondary memory is also
termed as external memory and refers to the various storage media on which a computer can store
data and programs.
The Secondary storage media can be fixed or removable. Fixed Storage media is an internal storage
medium like hard disk that is fixed inside the computer.
Storage medium that are portable and can be taken outside the computer are termed as removable
storage media.
Types of fixed storage: SSD (solid-state disk) units, Hard disk drives (HDD)
Types of removable storage media: Pen Drives, External Hard Disk