Memory Hierarchy
Memory Hierarchy
Memory Hierarchy
Memory Hierarchy is one of the most required things in Computer Memory as it helps in
optimizing the memory available in the computer. There are multiple levels present in the
memory, each one having a different size, different cost, etc. Some types of memory like
cache, and main memory are faster as compared to other types of memory but they are
having a little less size and are also costly whereas some memory has a little higher storage
value, but they are a little slower. Accessing of data is not similar in all types of memory,
some have faster access whereas some have slower access.
Memory hierarchy optimizes access times and costs in computer systems. You can
explore this and more in the GATE CS Self-Paced Course .
1. Registers
Registers are small, high-speed memory units located in the CPU. They are used to store
the most frequently used data and instructions. Registers have the fastest access time and
the smallest storage capacity, typically ranging from 16 to 64 bits.
2. Cache Memory
Cache memory is a small, fast memory unit located close to the CPU. It stores frequently
used data and instructions that have been recently accessed from the main memory.
Cache memory is designed to minimize the time it takes to access data by providing the
CPU with quick access to frequently used data.
3. Main Memory
Main memory , also known as RAM (Random Access Memory), is the primary memory of a
computer system. It has a larger storage capacity than cache memory, but it is slower. Main
memory is used to store data and instructions that are currently in use by the CPU.
• Static RAM: Static RAM stores the binary information in flip flops and information
remains valid until power is supplied. It has a faster access time and is used in
implementing cache memory.
4. Secondary Storage
Secondary storage, such as hard disk drives (HDD) and solid-state drives (SSD) , is a non-
volatile memory unit that has a larger storage capacity than main memory. It is used to
store data and instructions that are not currently in use by the CPU. Secondary storage has
the slowest access time and is typically the least expensive type of memory in the memory
hierarchy.
5. Magnetic Disk
Magnetic Disks are simply circular plates that are fabricated with either a metal or a plastic
or a magnetized material. The Magnetic disks work at a high speed inside the computer and
these are frequently used.
6. Magnetic Tape
Magnetic Tape is simply a magnetic recording device that is covered with a plastic film. It is
generally used for the backup of data. In the case of a magnetic tape, the access time for a
computer is a little slower and therefore, it requires some amount of time for accessing the
strip.
• Capacity: It is the global volume of information the memory can store. As we move
from top to bottom in the Hierarchy, the capacity increases.
• Access Time: It is the time interval between the read/write request and the
availability of the data. As we move from top to bottom in the Hierarchy, the access
time increases.
• Performance: Earlier when the computer system was designed without a Memory
Hierarchy design, the speed gap increased between the CPU registers and Main
Memory due to a large difference in access time. This results in lower performance
of the system and thus, enhancement was required. This enhancement was made
in the form of Memory Hierarchy Design because of which the performance of the
system increases. One of the most significant ways to increase system performance
is minimizing how far down the memory hierarchy one has to go to manipulate data.
• Cost Per Bit: As we move from bottom to top in the Hierarchy, the cost per bit
increases i.e. Internal Memory is costlier than External Memory.
• It helps in removing some destruction, and managing the memory in a better way.
According to the memory Hierarchy, the system-supported memory standards are defined
below:
Level 1 2 3 4
Secondary
Name Register Cache Main Memory
Memory
Level 1 2 3 4
less than 16
Size <1 KB <16GB >100 GB
MB
DRAM
On-
Implementation Multi-ports (capacitor Magnetic
chip/SRAM
memory)
0.25ns to
Access Time 0.5 to 25ns 80ns to 250ns 50 lakh ns
0.5ns
20000 to 1 5000 to
Bandwidth 1000 to 5000 20 to 150
lakh MB 15000
Operating Operating
Managed by Compiler Hardware
System System
It can store the set of patterns as memories when the associative memory is being presented
with a key pattern, it responds by producing one of the stored pattern which closely
resembles or relates to the key pattern.
It can be viewed as data correlation here. input data is correlated with that of stored data in
the CAM.
In conventional memory, data is stored in specific locations, called addresses, and retrieved
by referencing those addresses. In associative memory, data is stored together with
additional tags or metadata that describe its content. When a search is performed, the
associative memory compares the search query with the tags of all stored data, and retrieves
the data that matches the query.
Associative memory is designed to quickly find matching data, even when the search query
is incomplete or imprecise. This is achieved by using parallel processing techniques, where
multiple search queries can be performed simultaneously. The search is also performed in
a single step, as opposed to conventional memory where multiple steps are required to
locate the data.
• Match Register: It has m-bits, One bit corresponding to each word in the memory
array. After the making process, the bits corresponding to matching words in match
register are set to ‘1’.
3. Networking: Associative memory is used in network routing tables to quickly find the
path to a destination network based on its address.
4. It is used in page tables used by the virtual memory and used in neural networks.
1. Each cell must have storage capability and logical circuits for matching its content
with external argument.