Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Memory Hierarchy

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Why Memory Hierarchy is Required in the System?

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.

Types of Memory Hierarchy

This Memory Hierarchy Design is divided into 2 main types:

• External Memory or Secondary Memory: Comprising of Magnetic Disk, Optical


Disk, and Magnetic Tape i.e. peripheral storage devices which are accessible by the
processor via an I/O Module.

• Internal Memory or Primary Memory: Comprising of Main Memory, Cache Memory


& CPU registers . This is directly accessible by the processor.

Memory Hierarchy Design

Memory hierarchy optimizes access times and costs in computer systems. You can
explore this and more in the GATE CS Self-Paced Course .

Memory Hierarchy Design

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.

Types of Main Memory

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

• Dynamic RAM: It stores the binary information as a charge on the capacitor. It


requires refreshing circuitry to maintain the charge on the capacitors after a few
milliseconds. It contains more memory cells per unit area as compared to SRAM.

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.

Characteristics of Memory Hierarchy

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

Advantages of Memory Hierarchy

• It helps in removing some destruction, and managing the memory in a better way.

• It helps in spreading the data all over the computer system.

• It saves the consumer’s price and time.

System-Supported Memory Standards

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

Backing from Main from Secondary


From cache from ie
Mechanism Memory Memory
Associative memory
Associative memory is also known as content addressable memory (CAM) or associative
storage or associative array. It is a special type of memory that is optimized for performing
searches through data, as opposed to providing a simple direct access to the data based on
the address.

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.

It forms of two type:

1. auto associative memory network : An auto-associative memory network, also


known as a recurrent neural network, is a type of associative memory that is used to
recall a pattern from partial or degraded inputs. In an auto-associative network, the
output of the network is fed back into the input, allowing the network to learn and
remember the patterns it has been trained on. This type of memory network is
commonly used in applications such as speech and image recognition, where the
input data may be incomplete or noisy.

2. hetero associative memory network : A hetero-associative memory network is a type


of associative memory that is used to associate one set of patterns with another. In a
hetero-associative network, the input pattern is associated with a different output
pattern, allowing the network to learn and remember the associations between the
two sets of patterns. This type of memory network is commonly used in applications
such as data compression and data retrieval.

Associative memory of conventional semiconductor memory (usually RAM) with added


comparison circuity that enables a search operation to complete in a single clock cycle. It is
a hardware search engine, a special type of computer memory used in certain very high
searching applications.

Associative memory, or content-addressable memory, allows data to be accessed based on


content rather than location. It’s particularly useful in high-speed searching applications. To
get a complete understanding of how associative memory works and its applications in
modern computing, the GATE CS Self-Paced Course offers detailed lessons on memory
types and operations.
How Does Associative Memory Work?

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.

Hardware organization of associative memory:-

Block Diagram of associative memory

• Argument Register: It contains words to be searched. It contains ‘n’ number of bits.

• 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’.

• Key Register: It provides a mask of choosing a particular field/key in argument


register. It specifies which part of the argument word need to be compared with words
in memory.
• Associative Memory Array: It combines word in that are to be compared with the
arguments word in parallel. It contains ‘m’ words with ‘n’ bit per word.

Applications of Associative memory :-

1. It can be only used in memory allocation format.

2. It is widely used in the database management systems, etc.

3. Networking: Associative memory is used in network routing tables to quickly find the
path to a destination network based on its address.

4. Image processing: Associative memory is used in image processing applications to


search for specific features or patterns within an image.

5. Artificial intelligence: Associative memory is used in artificial intelligence


applications such as expert systems and pattern recognition.

6. Database management: Associative memory can be used in database management


systems to quickly retrieve data based on its content.

Advantages of Associative memory :-

1. It is used where search time needs to be less or short.

2. It is suitable for parallel searches.

3. It is often used to speedup databases.

4. It is used in page tables used by the virtual memory and used in neural networks.

Disadvantages of Associative memory :-

1. It is more expensive than RAM

1. Each cell must have storage capability and logical circuits for matching its content
with external argument.

You might also like