Skip to main content
Engineering LibreTexts

7.2: Memory Hierarchy

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    Memory Hierarchy Design and its Characteristics

    In computer systems design, the concept of memory hierarchy is an enhancement to organize the computer's memory such that access time to memory is minimized. Memory hierarchy was developed based on a software program's behavior known as locality of references.The figure below depicts the different levels of memory hierarchy :


    Memory Hierarchy diagram detailed in the following text
    Figure \(\PageIndex{1}\):  ("Memory Hierarchy" by RishabhJain12Geeks for Geeks is licensed under CC BY-SA 4.0)

    This Memory Hierarchy Design is divided into 2 main types:

    1. External Memory or Secondary Memory 
      This level is comprised of peripheral storage devices which are accessible by the processor via I/O Module.
    2. Internal Memory or Primary Memory
      This level is comprised of memory that is directly accessible by the processor.

    We can infer the following characteristics of Memory Hierarchy Design from the above figure:

    1. Capacity:
      As we move from top to bottom in the hierarchy, the capacity increases.
    2. Access Time:
      This represents 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.
    3. Performance:
      In erly computer systems that were designed without the idea of memory hierarchy design, the speed gap increased between the CPU registers and main memory due to  difference in access time. This results in lower system performance, an enhancement was required. This enhancement was memory hierarchy design which provided the system with greater performance. One of the most significant ways to increase system performance is to minimize how far down the memory hierarchy one has to go to manipulate data. If we can keep system using lower numbered levels (higher up the hierarchy) then we get better performance.
    4. Cost per bit:
      As we move up the hierarchy -  from bottom to top - the cost per bit increases i.e. internal memory is costlier than external memory.

    Adapted from:
    "Memory Hierarchy Design and its Characteristics" by RishabhJain12Geeks for Geeks is licensed under CC BY-SA 4.0

    7.2: Memory Hierarchy is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?