Computer Fundamental
Computer Tutorial

Memory Hierarchy



Memory Hierarchy

The memory is characterized on the basis of two key factors—capacity and access time. Capacity is the amount of information (in bits) that a memory can store. Access time is the time interval between the read/ write request and the availability of data. The lesser the access time, the faster is the speed of memory. Ideally, we want the memory with fastest speed and largest capacity. However, the cost of fast memory is very high. The computer uses a hierarchy of memory that is organized in a manner to enable the fastest speed and largest capacity of memory.

hierarchy of the different memory types

The hierarchy of the different memory types

The internal memory and external memory are the two broad categories of memory used in the computer. The internal memory consists of the CPU registers, cache memory and primary memory. The internal memory is used by the CPU to perform the computing tasks. The external memory is also called the secondary memory. The secondary memory is used to store the large amount of data and the software.
With respect to CPU, the memory is organized as follows —
• Registers are placed inside the CPU (small capacity, high cost, very high speed)
• Cache memory is placed next in the hierarchy (inside and outside the CPU)
• Primary memory is placed next in the hierarchy
• Secondary memory is the farthest from CPU (large capacity, low cost, low speed)
The speed of memories is dependent on the kind of technology used for the memory. The registers, cache memory and primary memory are semiconductor memories. They do not have any moving parts and are fast memories. The secondary memory is magnetic or optical memory, has moving parts and has slow speed.