0% found this document useful (0 votes)
47 views

Types of Memory

Primary memory, also known as internal memory or main memory, refers to memory that is directly accessible by the processor via the data bus. It includes RAM and ROM, which temporarily store programs and data being actively worked on. There are different types of primary memory including main memory, cache memory, and register memory, with main memory being the largest but slowest and least expensive, and register memory being the smallest but fastest and most expensive. Secondary memory, also called external storage, is non-volatile storage used to permanently store programs and data, and includes internal fixed storage like hard drives as well as removable storage like USB drives. It has a much larger storage capacity than primary memory but is slower and less expensive.

Uploaded by

kunal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Types of Memory

Primary memory, also known as internal memory or main memory, refers to memory that is directly accessible by the processor via the data bus. It includes RAM and ROM, which temporarily store programs and data being actively worked on. There are different types of primary memory including main memory, cache memory, and register memory, with main memory being the largest but slowest and least expensive, and register memory being the smallest but fastest and most expensive. Secondary memory, also called external storage, is non-volatile storage used to permanently store programs and data, and includes internal fixed storage like hard drives as well as removable storage like USB drives. It has a much larger storage capacity than primary memory but is slower and less expensive.

Uploaded by

kunal
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Primary memory

Introduction to primary memory


• In order to store data and commands, computers need memory. Memory is
mechanically arranged as a vast number of cells, each of which can store
one bit of information. They are logically arranged as words, which are
groups of bits that are given an address. These memory addresses are used
to access data and instructions. The cost is determined by the speed at
which these memory addresses can be accessed. The cost of memory is
determined by the speed at which these memory addresses can be
accessed. The higher the memory level, the more expensive it is.

• Memory in computers is arranged in a hierarchical manner, with the fastest


access speeds and highest costs at the top, and the slowest access speeds
and therefore lowest costs at the bottom.
• Primary memory is called
main memory as well as
“internal memory.” It may
also known as primary
storage. Primary memory
refers to all kinds of
computing memories that are
directly accessible by the
processor via the data bus.
This helps a processor to enter
memory locations where
running programs and
currently processing data are
stored.

• Since primary memory is


expensive, technologies are
being designed to make it
• As a result, all applications
that use a microprocessor,
like machines, would use
memories. RAM and ROM,
which store programs, are
examples of primary
memory. The ability of these
memories is small, and they
are made with integrated
circuits (ICs) or
semiconductor devices. It has
a higher data access speed
than secondary memory. It
has a higher price tag than
secondary memory.
Different types of primary
memory:
• 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.
• 1. Random Access Memory
• It is a volatile type of memory wherein the memory loses its contents when the power
is switched off. The processor reads instructions/data from it and also writes into it.
Data and instructions are loaded into RAM from the external hard disk and processed
data are stored back into the hard disk.
• 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. This memory is costlier than RAM and hence the size is restricted to 1 GB
in most of the computers. 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.
• RAM has two subcategories:
• a. Static Random Access Memory (SRAM): Transistors are used in this memory and
constant power flow is needed to keep it alive. Data remains static in this memory
and hence no refresh is needed at any point in time. It has a short read/write cycle,
smaller in size, more expensive than dynamic RAM, and faster in data retrieval and
write, and hence it is deployed in special applications like cache memory.
• b. Dynamic Random Access Memory (DRAM): Capacitors are used in this type and it
tends to lose energy gradually over a period of time and hence the data is likely to be
lost. A periodic refresh is required to retain the data. It is a high-density type, cheaper
than SRAM but slower than it, larger in size, used in main memory mostly.
RAM(Random
Access Memory) Static Random Access
Memory (SRAM)

Dynamic Random Access Memory (DRAM)


2. Read-only Memory (ROM)
• A non-volatile type of memory that continues to hold the contents even when the
power is switched off. As per the name, contents can only be read from these
memory locations and it cannot be erased or rewritten. Contents like boot
program, firmware, mathematical tables in scientific applications are stored
during the manufacturing stage and sold with pre-stored contents. These contents
are used during the operation of the device and it cannot be altered. In modern
computers Flash memory is used for storing BIOS, Firmware instead of ROM as
it enables easier version updating.
• ROM has two subcategories:
• a. Programmable ROM (PROM): Difference between normal ROM and PROM
is that ROM is preloaded with contents when it is sold whereas PROM is sold as a
device with a blank memory and the contents are stored in PROM using a device
called PROM Programmer.  ROM is pre-stored with the proven and ready to use
contents during manufacturing whereas PROM allows flexibility and time to burn
the data post-manufacture when the content becomes ready after verification.
• b. Erasable Programmable ROM (EPROM): ROM once programmed can be
erased and reprogrammed. The electrical signal can be used to erase the contents
stored already.  Such a PROM is known as EEPROM. Contents can be erased
using UV rays also and such devices are called UV EPROM. The process of
erasing the data using an Electric signal is simpler than operating with UV rays.
Read-only Memory (ROM) Programmable ROM (PROM)

Erasable Programmable ROM (EPROM)


• 3. 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.
• 4. 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.

Cache memory
Register memory
Secondary memory
• Secondary Memory
• We have read so far, that primary memory is volatile and
has limited capacity. So, it is important to have another
form of memory that has a larger storage capacity and
from which data and programs are not lost when the
computer is turned off. Such a type of memory is called
secondary memory. In secondary memory, programs and
data are stored. It is also called auxiliary memory. It is
different from primary memory as it is not directly
accessible through the CPU and is non-volatile.
Secondary or external storage devices have a much
larger storage capacity and the cost of secondary
memory is less as compared to primary memory.
Use of secondary memory
• Secondary memory is used for different purposes but the
main purposes of using secondary memory are:
• Permanent storage: As we know that primary memory
stores data only when the power supply is on, it loses data
when the power is off. So we need a secondary memory to
stores data permanently even if the power supply is off.
• Large Storage: Secondary memory provides large storage
space so that we can store large data like videos, images,
audios, files, etc. permanently.
• Portable: Some secondary devices are removable. So, we
can easily store or transfer data from one computer or device
to another.
Types of Secondary memory
Secondary memory is of two

types:
1. Fixed storage
• In secondary memory, a fixed storage is an internal media
device that is used to store data in a computer system. Fixed
storage is generally known as fixed disk drives or hard Internal view of pen drive
drives. Generally, the data of the computer system is stored
in a built-in fixed storage device. Fixed storage does not
mean that you can not remove them from the computer
system, you can remove the fixed storage device for
repairing, for the upgrade, or for maintenance, etc. with the
help of an expert or engineer. 
• Types of fixed storage:
• Following are the types of fixed storage:
• Internal flash memory (rare) Hard disk drive
• SSD (solid-state disk)
• Hard disk drives (HDD) Solid state drive
• 2. Removable storage
• In secondary memory, removable storage is an external
media device that is used to store data in a computer system.
Removable storage is generally known as disks drives or
external drives. It is a storage device that can be inserted or
removed from the computer according to our requirements.
We can easily remove them from the computer system while
the computer system is running. Removable storage devices
are portable so we can easily transfer data from one
Types of removable
storage:
• Types of Removable Storage: Compact disk(CD)
• Optical discs (like CDs, DVDs,
Blu-ray discs, etc.)
• Memory cards
• Floppy disks
• Magnetic tapes Memory card
• Disk packs Floppy disk

• Paper storage (like punched


tapes, punched cards, etc.)

Magnetic tape 300mb removable disk Punched card


pack
Cache memory
• Cache memory is a high-speed memory, which is small
in size but faster than the main memory (RAM). The
CPU can access it more quickly than the primary
memory. So, it is used to synchronize with high-speed
CPU and to improve its performance.
Cache memory can only be accessed by CPU. It
can be a reserved part of the main memory or a
storage device outside the CPU. It holds the data
and programs which are frequently used by the
CPU. So, it makes sure that the data is instantly
available for CPU whenever the CPU needs this
data. In other words, if the CPU finds the required
data or instructions in the cache memory, it
doesn't need to access the primary memory
(RAM). Thus, by acting as a buffer between RAM
and CPU, it speeds up the system performance.
Types of Cache Memory:
• L1: It is the first level of cache memory, which is called Level 1 cache or L1 cache.
In this type of cache memory, a small amount of memory is present inside the
CPU itself. If a CPU has four cores (quad core cpu), then each core will have its
own level 1 cache. As this memory is present in the CPU, it can work at the same
speed as of the CPU. The size of this memory ranges from 2KB to 64 KB. The L1
cache further has two types of caches: Instruction cache, which stores instructions
required by the CPU, and the data cache that stores the data required by the CPU.
• L2: This cache is known as Level 2 cache or L2 cache. This level 2 cache may be
inside the CPU or outside the CPU. All the cores of a CPU can have their own
separate level 2 cache, or they can share one L2 cache among themselves. In case
it is outside the CPU, it is connected with the CPU with a very high-speed bus.
The memory size of this cache is in the range of 256 KB to the 512 KB. In terms of
speed, they are slower than the L1 cache.
• L3: It is known as Level 3 cache or L3 cache. This cache is not present in all the
processors; some high-end processors may have this type of cache. This cache is
used to enhance the performance of Level 1 and Level 2 cache. It is located
outside the CPU and is shared by all the cores of a CPU. Its memory size ranges
from 1 MB to 8 MB. Although it is slower than L1 and L2 cache, it is faster than
Random Access Memory (RAM).
How does cache memory work with CPU?

• When CPU needs the data, first of all, it looks inside the L1 cache. If it does not
find anything in L1, it looks inside the L2 cache. If again, it does not find the data
in L2 cache, it looks into the L3 cache. If data is found in the cache memory, then
it is known as a cache hit. On the contrary, if data is not found inside the cache, it
is called a cache miss.
• If data is not available in any of the cache memories, it looks inside the Random
Access Memory (RAM). If RAM also does not have the data, then it will get that
data from the Hard Disk Drive.
• So, when a computer is started for the first time, or an application is opened for
the first time, data is not available in cache memory or in RAM. In this case, the
CPU gets the data directly from the hard disk drive. Thereafter, when you start
your computer or open an application, CPU can get that data from cache memory
or RAM.
Thank You
&
Stay Safe

You might also like