Computer Memory and Memory Hierarchy

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

Computer - Memory

A memory is just like a human brain. It is used to store data and instructions. Computer
memory is the storage space in the computer, where data is to be processed and
instructions required for processing are stored. The memory is divided into large
number of small parts called cells. Each location or cell has a unique address, which
varies from zero to memory size minus one. For example, if the computer has 64k
words, then this memory unit has 64 * 1024 = 65536 memory locations. The address of
these locations varies from 0 to 65535.
Memory is primarily of three types −

 Registers
 Cache Memory

 Primary Memory/Main Memory

 Secondary Memory

Registers
Usually, the register is a static RAM or SRAM in the processor of the
computer which is used for holding the data word which is typically 64 or
128 bits. The program counter register is the most important as
well as found in all the processors. Most of the processors use a status
word register as well as an accumulator. A status word register is used
for decision making, and the accumulator is used to store the data like
mathematical operation. Usually, computers like complex
instruction set computers have so many registers for accepting
main memory, and RISC- reduced instruction set computers
have more registers.

Cache Memory
Cache memory is a very high speed semiconductor memory which can speed up the
CPU. It acts as a buffer between the CPU and the main memory. It is used to hold
those parts of data and program which are most frequently used by the CPU. The parts
of data and programs are transferred from the disk to cache memory by the operating
system, from where the CPU can access them.
Advantages
The advantages of cache memory are as follows −

 Cache memory is faster than main memory.


 It consumes less access time as compared to main memory.

 It stores the program that can be executed within a short period of time.

 It stores data for temporary use.

Disadvantages
The disadvantages of cache memory are as follows −

 Cache memory has limited capacity.


 It is very expensive.
Primary Memory (Main Memory)
Primary memory holds only those data and instructions on which the computer is
currently working. It has a limited capacity and data is lost when power is switched off.
It is generally made up of semiconductor device. These memories are not as fast as
registers. The data and instruction required to be processed resides in the main
memory. It is divided into two subcategories RAM and ROM.

Characteristics of Main Memory

 These are semiconductor memories.


 It is known as the main memory.

 Usually volatile memory.

 Data is lost in case power is switched off.

 It is the working memory of the computer.

 Faster than secondary memories.

 A computer cannot run without the primary memory.

Secondary Memory
This type of memory is also known as external memory or non-volatile. It is slower than
the main memory. These are used for storing data/information permanently. CPU
directly does not access these memories, instead they are accessed via input-output
routines. The contents of secondary memories are first transferred to the main
memory, and then the CPU can access it. For example, disk, CD-ROM, DVD, etc.

Characteristics of Secondary Memory

 These are magnetic and optical memories.


 It is known as the backup memory.

 It is a non-volatile memory.

 Data is permanently stored even if power is switched off.

 It is used for storage of data in a computer.

 Computer may run without the secondary memory.

 Slower than primary memories.

Primary memory:
Primary memory is the only type of memory which is directly accessed by the CPU. The CPU
continuously reads instructions stored in the primary memory and executes them. Any data that
has to be operated by the CPU is also stored. The information is transferred to various locations
through the BUS. Primary memories are of two types. They are:

1. RAM: It stands for Random Access Memory. Here data can be stored temporarily, so
this type of memory is called as temporary memory or volatile memory because when
power fails the data from RAM will be erased. The information stored in the RAM is
basically loaded from the computer’s disk and includes information related to the
operating system and applications that are currently executed by the processor. RAM is
considered random access because any memory cell can be directly accessed if its
address is known. RAM is of distinct types like SRAM, DRAM, and VRAM.
2. ROM: It stands for Read Only Memory. In this, the data will be furnished by the
manufacturers regarding the system, so this information can simply be read by the user
but cannot add new data or it cannot be modified. ROMs are of distinct types:
 PROM – Programmable Read Only Memory (programmable only one time)
 EPROM – Erasable Programmable Read Only Memory (several times programmable)
 EEPROM – Electrically Erasable Programmable Read Only Memory (Electrically
Erasable
 UVEPROM – Ultra Violet Erasable Programmable Read Only Memory (Erasable through
ultra violet rays)

1. PROM (Programmable read-only memory) – It can be


programmed by user. Once programmed, the data and instructions
in it cannot be changed.
2. EPROM (Erasable Programmable read only memory) – It
can be reprogrammed. To erase data from it, expose it to ultra
violet light. To reprogram it, erase all the previous data.
3. EEPROM (Electrically erasable programmable read only
memory) – The data can be erased by applying electric field, no
need of ultra violet light. We can erase only portions of the chip.
4. UVEPROM – Ultra Violet Erasable Programmable Read Only Memory (Erasable through
ultra violet rays)

Secondary memory:
Secondary memory or auxiliary memory consists of slower and less expensive device that
communicates indirectly with CPU via main memory. The secondary memory stores the data
and keeps it even when the power fails. It is used to store or save large data or programs or
other information. The secondary storage devices are explained below:
 Magnetic disks
 Magnetic tape
 Optical disk
 USB flash drive
 Mass storage devices

1. Magnetic disks: Magnetic disks are made of rigid metals or synthetic plastic
material. The disk platter is coated on both the surfaces with magnetic material
and both the surfaces can be used for storage. The magnetic disk furnishes
direct access and is for both small and large computer systems. The magnetic
disk comes in two forms:
 Floppy disks
 Hard disks

2. Magnetic tape: magnetic tape is serial access storage medium and it can
store a large volume of data at low costs. The conventional magnetic tape is in
reels of up to 3600 feet made of Mylar plastic tape. The tape is one-half inch in
width and is coated with magnetic material on one side. The reel of tape is
loaded on a magnetic tape drive unit. During any read/write operation, the tape
is moved from one spool to another in the same way as in the audiocassette
tape recorder. The magnetic tape is densely packed with magnetic spots in
frames across its width.

3. Optical drives: optical drives are a storage medium from which data is read
and to which it is written by lasers. Optical disks can store much more data up
to 6GB. Optical store devices are the most widely used and reliable storage
devices. The most widely used type of optical storage devices are explained
below:
 CD – ROM
 DVD – ROM
 CD – RECORDABLE
 CD – REWRITABLE
 PHOTO – CD

4. USB flash drives: USB flash drives are removable, rewritable and are
physically much smaller drives, which have the weight of less than 30g. In the
year of 2010, the storage capacity of the USB flash drives was as large as
256GB. Such devices are a good substitute for floppy disks and CD – ROMs as
they are smaller, faster, have thousands of times more capacity, and are more
durable and reliable. Until 2005, most desktop and laptop computers had floppy
disk drives, but nowadays floppy disk drives have been abandoned in favor of
USB ports. The USB connector is often protected inside a removable cap,
although it is not likely to be damaged if unprotected. USB flash drives draw
power from the computer through external USB connection. The most widely
used USB flash drives are the memory cards.

5. Mass storage devices: Mass storage devices refer to the saving of huge
data in a persistent manner. Mass storage machines can store up to several
trillion bytes of data and hence are used to store or save large databases, such
as the information of customers of a big retail chain and library transactions of
students in a college. Some of the commonly used mass storage devices are
explained below:
 Disk array
 Automated tape
 CD – ROM jukebox

Memory Hierarchy in Computer Architecture

The memory hierarchy design in a computer system mainly includes


different storage devices. Most of the computers were inbuilt with extra
storage to run more powerfully beyond the main memory capacity. The
following memory hierarchy diagram is a hierarchical pyramid for
computer memory. The designing of the memory hierarchy is divided into two
types such as primary (Internal) memory and secondary (External) memory.
Me
mory Hierarchy

You might also like