Discuss the Memory Hierarchy in Computer Architecture?

The memory unit is an important component in any digital computer since it is required for saving programs and information. A very small computer with limited software can fulfill its intended function without the requirement for additional storage capacity.

There is only not limited space in one memory unit to contain all the programs used in an ordinary computer. Further, various computer users acquire and continue to acquire huge amounts of data-processing software. It is not all acquired data that is required by the processor at an equal time. Hence, it is more cost-effective to use low-cost storage devices to distribute as a backup for saving the data that is not frequently used by the CPU.

The memory unit that connects directly with the called CPU is known as the main memory. The computer that provides backup storage is referred to as auxiliary memory. The most frequent devices that provide storage in ordinary computer systems are magnetic disks and magnetic tapes.

They are mainly used to store system programs, huge information files, and other backup information. Only programs and data that are currently required by the processor reside in the main memory. All other data is saved in auxiliary/secondary memory and transferred to the main memory when required.

The overall memory capacity of a device can be visualized as being a structure of components. The memory hierarchy system includes all storage devices working in a device system from the moderate but high-capacity auxiliary memory to approximately faster main memory, to an even smaller and faster cache memory applicable to the large-speed processing logic.

The figure shows the components in a typical memory hierarchy.

The main memory takes up the main area due to its ability to connect directly with the CPU and with auxiliary memory devices, through an Input/Output (I/O) processor. When the CPU needs programs that are not present in the main memory, they are brought in from the auxiliary memory.

It can increase the speed of processing, a very-high-speed memory, known as cache, is used. It helps in making the current data and programs available to the CPU at high speed. The cache memory is used in computer systems to reimburse for the difference between the main memory access time and processor logic speed.

The cache access time is nearly equal to the processor logic clock cycle time. The cache is used to store the following −

  • Fragments of the program that is presently being executed in the CPU
  • Temporary data that is repeatedly needed in the current operation