The collection of every type of memory present in a computer is understood through memory hierarchy. Memory hierarchy is represented by the shape of a pyramid in which computer memory can be divided into five hierarchies or levels based on speed and usage. The upper pointed part of the pyramid contains the memory which takes the least access time and is the fastest. The lowest part contains the memory that takes the most time to access. The processor keeps switching from one level to another as per its requirement.
The design of Memory Hierarchy can be divided into 3 main parts
Primary or internal memory: This memory is accessed directly by the CPU. Memory stores only such data or programs which are currently being executed by the CPU. Primary memory includes cache memory, main memory and register.
Secondary or External memory: Data is stored permanently in this memory; this memory is not directly accessed by the CPU. This memory is connected separately to the computer. Secondary memory is also called auxiliary memory. This memory includes- optical disk, magnetic disk, hard drive, SSD, USB drive.
Tertiary Storage: This storage comes with such memories which we can mount and dismount. The speed of this memory is very slow. Tertiary storage includes CD, DVD, magnetic tape and blue ray disk.
Understand the picture of Memory Hierarchy
As shown in the picture, first comes Register, Cache Memory, Main Memory, Magnetic Disk and then Magnetic Tapes. Can we arrange them in any order? No, because this pyramid has been designed in such a way that it explains many different things. As we move from top to bottom in the pyramid, the storage capacity of the memory is increasing. As we are coming down the transfer time and access time are also increasing. When the transfer time and access time increases then technically memory becomes slow.
Register memory is at the top of the picture. It has the lowest storage capacity and takes less access time and transfer time, due to which register memory is the fastest memory. In the rest of the memory below, the access time and transfer time increases. Now we move from bottom to top in the hierarchy pyramid, then the cost per bit and speed of memory increases and the storage capacity decreases. The last memory in the pyramid is magnetic tape. Its storage capacity is the highest but access time and transfer time are very high. Compared with register memory, it is the slowest memory. Rest you can easily understand it from the picture above.
Characteristics of Memory Hierarchy
Access time: The time taken by the CPU to process the read/write request in memory is called access time. When we move from top to bottom in the memory hierarchy, access time increases.
Performance: In the initial phase, when the computer system was designed without memory hierarchy, the result was that the speed gap between the registers and main memory increases due to which the performance of the computer declined. Then memory hierarchy was used to improve the performance of the computer system. When we move from top to bottom in the memory hierarchy, performance decreases.
Capacity: The amount of data or information that can be stored in the memory of a computer system is called Capacity. Each memory in the pyramid has its own capacity to store data, the smallest unit goes from bit to Tera byte/peta byte. In Memory Hierarchy the capacity increases from top to bottom.
Cost per bit: This means the cost of memory. When we go from bottom to top in the memory hierarchy, the value of every bit in the memory increases, that is, internal memory is much more expensive than external memory.
Advantages of memory hierarchy
- To make the memory system in computers easy to understand and economical.
- Data can be transferred easily and quickly to the computer system.
- Removes external destruction.
- Domain allows paging and pre-paging.
- Swapping is efficient.
- Average access time improves.
The memory hierarchy is expected to evolve as new memory technologies are developed and introduced. For example, researchers are exploring the use of new memory technologies such as non-volatile memory and phase-change memory to create faster and more efficient memory systems. Additionally, advances in computer architecture are expected to result in the creation of new memory hierarchy levels, with improved speed and efficiency, to meet the growing demands of modern computing applications.
If you are a student of Computer Science or Electrical, or any other student, then you must know about Memory Hierarchy in Computer Architecture. Because in this growing era of technology, almost everyone will have a computer, in such a situation, you must know about Memory Hierarchy. In Memory Hierarchy, you are told in details about the memory in the computer, because it is very important to have memory to store any data in the computer, hence you should also know in which order the memory is located inside the computer. All the information is there, how it works, etc.