The Wayback Machine - https://web.archive.org/web/20240927080746/https://www.geeksforgeeks.org/memory-hierarchy-design-and-its-characteristics/
Open In App

Memory Hierarchy Design and its Characteristics

Last Updated : 19 Jun, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In the Computer System Design, Memory Hierarchy is an enhancement to organize the memory such that it can minimize the access time. The Memory Hierarchy was developed based on a program behavior known as locality of references. The figure below clearly demonstrates the different levels of the memory hierarchy.

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 Design

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
Name Register Cache Main Memory Secondary Memory
Size     <1 KB less than 16 MB         <16GB        >100 GB
Implementation Multi-ports On-chip/SRAM DRAM (capacitor memory)     Magnetic
Access Time   0.25ns to 0.5ns 0.5 to 25ns 80ns  to 250ns 50 lakh ns
Bandwidth 20000 to 1 lakh MB 5000 to 15000 1000 to 5000 20 to 150
Managed by Compiler Hardware Operating System  Operating System
Backing Mechanism From cache  from Main Memory from Secondary Memory from ie

FAQs

1. What do you mean by Memory Hierarchy?

Answer:

Memory Hierarchy can be simply illustrated as the organization of the memory for saving the access time. Because of the nicely written codes or program, memory hierarchy works well. It takes less time in accessing at the current level.

2. Explain the types of Memory Hierarchy.

Answer:

Here are the some types of the Memory Hierarchy:

  • External Memory or Secondary Memory
  • Internal Memory or Primary Memory

3. In DBMS, How memory Hierarchy is listed?

Answer:

In Database Management System, Memory Hierarchy can be illustrated as follows:

  • CPU Registers
  • Cache Memory
  • Main Memory or Primary Memory


Previous Article
Next Article

Similar Reads

Subprogram and its Characteristics
A Subprogram is a program inside any larger program that can be reused any number of times. Characteristics of a Subprogram: (1) A Subprogram is implemented using the Call & Return instructions in Assembly Language. (2) The Call Instruction is present in the Main Program and the Return(Ret) Instruction is present in the subprogram itself. (3) I
2 min read
Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
Random Access Memory (RAM) is used to read and write. It is the part of primary memory and used in order to store running applications (programs) and program's data for performing operation. It is mainly of two types: Dynamic RAM (or DRAM) and Static RAM (or SRAM). RAM is made up of small memory cells that are arranged in a grid pattern. Each cell
4 min read
Difference between Virtual memory and Cache memory
Cache Memory: Cache memory increases the accessing speed of CPU. It is not a technique but a memory unit i.e a storage device. In cache memory, recently used data is copied. Whenever the program is ready to be executed, it is fetched from main memory and then copied to the cache memory. But, if its copy is already present in the cache memory then t
2 min read
Difference between Byte Addressable Memory and Word Addressable Memory
Memory is a storage component in the Computer used to store application programs. The Memory Chip is divided into equal parts called as "CELLS" . Each Cell is uniquely identified by a binary number called as "ADDRESS" . For example, the Memory Chip configuration is represented as '64 K x 8' as shown in the figure below. The following information ca
3 min read
Random Access Memory (RAM) and Read Only Memory (ROM)
Memory is a fundamental component of computing systems, essential for performing various tasks efficiently. It plays a crucial role in how computers operate, influencing speed, performance, and data management. In the realm of computer memory, two primary types stand out: Random Access Memory (RAM) and Read-Only Memory (ROM). Understanding the diff
8 min read
Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
In computer architecture, and especially in Multiprocessors systems, memory access models play a critical role that determines performance, scalability, and generally, efficiency of the system. The two shared-memory models most frequently used are UMA and NUMA. This paper deals with these shared-memory models, explaining their characteristics, adva
5 min read
Computer System Level Hierarchy
Computer System Level Hierarchy is the combination of different levels that connects the computer with the user and that makes the use of the computer. It also describes how the computational activities are performed on the computer and it shows all the elements used in different levels of system. Computer System Level Hierarchy consists of seven l
4 min read
Computational Complexity v/s Chomsky Hierarchy
1. Computational complexity :Computational complexity, a measure of the number of computing resources(time and space) that a particular algorithm consumes when it runs. The time complexity of a Turing machine is given by the function T(n), where T(n) = Maximum number of moves made by the TM to process a string of length n. The space complexity of t
4 min read
Cache Memory Design
Prerequisite - Cache Memory A detailed discussion of the cache style is given in this article. The key elements are concisely summarized here. we are going to see that similar style problems should be self-addressed in addressing storage and cache style. They represent the subsequent categories: Cache size, Block size, Mapping function, Replacement
5 min read
Concept of Cache Memory Design
Cache Memory plays a significant role in reducing the processing time of a program by provide swift access to data/instructions. Cache memory is small and fast while the main memory is big and slow. The concept of caching is explained below. Caching Principle : The intent of cache memory is to provide the fastest access to resources without comprom
4 min read
Encryption, Its Algorithms And Its Future
Encryption is very important in today's world, it is the process of transforming plaintext into ciphertext to maintain data security, and it is a crucial tool used in modern cyber security. It secures sensitive data by rendering it unreadable to unauthorized events, making sure of confidentiality, integrity, and authenticity. What is Encryption?Enc
6 min read
Difference between Characteristics of Combinational and Sequential circuits
Combinational and sequential are important building blocks used in the many electronic devices. The main difference between them is how they work with the time. Combinational circuits dont care about the time they just react to what is happening right now. Sequential circuits on remember what happened before and use that information along with the
6 min read
Characteristics of Computer System
A computer is a fast electronic device that processes raw data, performs arithmetic and logical operations, and produces output. Nowadays, the computer has become a part of our life and can be used in most fields. In a computer, there are various characteristics of computer systems depending on their size, capacity, and specifications. But, the maj
4 min read
Introduction of Control Unit and its Design
A Central Processing Unit is the most important component of a computer system. A control unit is a part of the CPU. A control unit controls the operations of all parts of the computer but it does not carry out any data processing operations. What is a Control Unit?The Control Unit is the part of the computer's central processing unit (CPU), which
10 min read
Allocating kernel memory (buddy system and slab system)
Prerequisite - Buddy System Introduction: Allocating kernel memory is a critical task in operating system design, as the kernel needs to manage memory efficiently and effectively to ensure optimal system performance. Two common methods for allocating kernel memory are the buddy system and the slab system. The buddy system is a memory allocation alg
9 min read
Memory mapped I/O and Isolated I/O
As a CPU needs to communicate with the various memory and input-output devices (I/O) as we know data between the processor and these devices flow with the help of the system bus. There are three ways in which system bus can be allotted to them : Separate set of address, control and data bus to I/O and memory.Have common bus (data and address) for I
5 min read
2D and 2.5D Memory organization
The internal structure of Memory either RAM or ROM is made up of memory cells that contain a memory bit. A group of 8 bits makes a byte. The memory is in the form of a multidimensional array of rows and columns. In which, each cell stores a bit and a complete row contains a word. A memory simply can be divided into this below form. 2n = N where n i
4 min read
Read and Write operations in Memory
A memory unit stores binary information in groups of bits called words. Data input lines provide the information to be stored into the memory, Data output lines carry the information out from the memory. The control lines Read and write specifies the direction of transfer of data. Basically, in the memory organization, there are [Tex]2^{l} [/Tex]me
3 min read
Difference between Memory based and Register based Addressing Modes
Prerequisite - Addressing Modes Addressing modes are the operations field specifies the operations which need to be performed. The operation must be executed on some data which is already stored in computer registers or in the memory. The way of choosing operands during program execution is dependent on addressing modes of instruction. "The address
4 min read
Subroutine, Subroutine nesting and Stack memory
In computer programming, Instructions that are frequently used in the program are termed Subroutines. This article will provide a detailed discussion on Subroutines, Subroutine Nesting, and Stack Memory. Additionally, we will explore the advantages and disadvantages of these topics. Let's begin with Subroutines. What is a Subroutine?A set of instru
5 min read
Differences between Associative and Cache Memory
1. Associative Memory: The time required to find an object stored in memory can be significantly reduced if the stored data can be identified by the content of the data for its own use rather than by access. A memory unit accessed by a material is known as an associative memory or a content addressable memory (CAM). This type of memory is accessed
2 min read
MCQ on Memory allocation and compilation process
1. What will be the output of the following code? C/C++ Code #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main() { union test { int i; float f; char c; }; union test* t; t = (union test*)malloc(sizeof(union test)); t-&gt;f = 20.60f; printf(&quot;%f&quot;, t-&gt;f); return 0; } (a) Garbage value (b) 20.60000
3 min read
Difference between Cache Coherence and Memory Consistency
1. Cache coherence :Cache coherence in computer architecture refers to the consistency of shared resource data that is stored in multiple local caches. When clients in a system maintain caches of a shared memory resource, problems with incoherent data can arise, which is especially true for CPUs in a multiprocessing system.In a shared memory multip
2 min read
Difference Between Contiguous and Non-Contiguous Memory Allocation
Memory management is one of the fundamentals of operating systems that has implications for its performances and use of resources. These are discussed below: Contiguous and non-contiguous allocation of memory Allocation of memory may take either of the following forms: This article enables you to know the difference between the two, how memory is a
5 min read
Difference Between Register and Memory
Registers and memory are essential for the operation of a computer, each having its own advantages. Registers offer the CPU quick access to data it must process, thus ensuring fast operation. Memory, on the other hand, provides storage space needed for large amounts of data and instructions during program execution. Although registers are small and
5 min read
Difference Between Efficiency and Speedup in Cache Memory
To understand the operation of cache memory, one has to familiarize the concepts of efficiency as well as speedup in computer architecture. These two metrics are sometimes considered synonyms but in fact they have different applications and let a system analyst come across different picture of the system’s efficiency. Effectiveness is the ability o
6 min read
Classification and Programming of Read-Only Memory (ROM)
Read-Only Memory or ROM is another significant non Volatile storage control in computed systems which mainly stores data permanently whether the power is off or not. While RAM is a temporary storage type used in computers and printers, ROM contains firmware and other instructions which are burnt, into the hardware during its manufacturing. This art
15+ min read
Difference between Cache Memory and Register
In the context of a computer’s architecture, two terms that may be familiar are the cache memory and the register, however, few people may not know the differences and functions of each of the two components. Both of them are important to the CPU but they have different roles and are used in different manner. In this article, we will look at some i
5 min read
Difference between Random Access Memory (RAM) and Hard Disk Drive (HDD)
A person novice to computers often is in confusion between Random Access Memory (RAM) and Hard Disk Drive (HDD). The data on which CPU needs to work out is stored temporarily in RAM. The disadvantage of RAM is, it's volatile and data is lost once the computer is turned off or shut down at failure. On the other hand, HDD is not volatile and used to
6 min read
Difference between Primary and Secondary Memory
Primary Memory(RAM) is a type of memory where the computer stores it's actively using data, it's very fast but loses power while Secondary Memory(eg: SSD, HDD) can hold our files and programs for long term and our data is safe but less fast than primary. In this article, we are going to discuss the difference between primary and secondary memory in
4 min read