Aaron 1
Aaron 1
optimize the performance and efficiency of a computer system. It consists of several memory
levels, each with varying characteristics, capacities, and access times. The primary purpose of
this hierarchy is to bridge the gap between the high-speed, low-capacity memory and the slower,
high capacity storage devices to provide a balance of speed and storage capacity that can meet
the demands of modern computing. Alan Clements, (2013).
The idea centers on a fundamental property of computer programs known as locality. Programs
with good locality tend to access the same set of data items over and over again, or they tend to
access sets of nearby data items. Programs with good locality tend to access more data items
from the upper levels of the memory hierarchy than programs with poor locality, and thus run
faster.
The overall effect is a large pool of memory that costs as much as the cheap storage near the
bottom of the hierarchy, but that serves data to programs at almost the rate of the fast storage
near the top of the hierarchy. Alan Clements, (2013).
Here is an overview of the key memory levels and their purpose in the computer hierarchy:
Level 1: cache memory. Cache memory is required to store segments of programs or chunks of
data that are frequently accessed by the processor. When the CPU needs to access program code
or data, it first checks the cache memory. If it finds the data, it reads it quickly. If it doesn't, it
looks into the main memory to find the required data. Toy, Wing; Zee, Benjamin (1986).
Cache memory is usually smaller in size than a CPU register, typically measured in megabytes
(MB). It is implemented using SRAM. Usually, the cache is inside the processor. However, it
may also be implemented as a separate integrated circuit (IC). Toy, Wing; Zee, Benjamin (1986).
Level 2: primary/main memory. The primary memory communicates with the CPU and with the
peripheral or auxiliary memory devices through the I/O processor. It is the primary storage unit
of a computer system; it's often referred to as random access memory (RAM) and is
implemented using dynamic RAM (DRAM) components. However, main memory may also
include read-only memory (ROM). Toy, Wing; Zee, Benjamin (1986).
Any program or data that is not currently required in the main memory is transferred into the
auxiliary memory to create space for programs and data that are currently active. Main memory
is less expensive than CPU registers and cache memory, and is also larger in size (typically
measured in gigabytes).
Level 3: secondary storage. Secondary storage devices such as magnetic disks occupy level 3 of
the memory hierarchy. Usually, both faces of a magnetic disk are utilized to store programs and
data. Further, multiple disks may be stacked on a spindle to provide a larger memory ecosystem.
In many systems, magnetic disks are being replaced by non-mechanical solid-state storage
devices.
Secondary storage devices act as backup storage and are much cheaper than the main memory
and cache. These memory types are also large in size and generally have capacities of up to 20
terabytes (TB). Van der Pas, Ruud (2002).
The optimization of computer performance through this hierarchy is achieved through the
principle of the memory hierarchy pyramid. Data is stored at various levels based on its
frequency of use and proximity to the CPU. Here is how this hierarchy optimizes performance:
Faster Access: Frequently used data and instructions are stored in the fastest memory levels
(registers and cache), reducing the time the CPU spends waiting for data to be fetched from
slower memory levels. Van der Pas, Ruud (2002).
Data Locality: The principle of locality ensures that data that is accessed together is stored
together, minimizing the number of times the CPU has to go to slower memory levels.
Capacity and Persistence: RAM provides a balance between speed and capacity, offering enough
space to hold active data and programs. Secondary storage devices offer long-term storage and
massive capacity. Solihin, Yan (2009).
Cost-Efficiency: Different memory technologies come with varying costs. By using a hierarchy,
computer systems can balance performance with cost-effectiveness. Faster, smaller memory
technologies are more expensive, so using them sparingly in caches while relying on slower,
larger storage for bulk data is a cost-effective approach. Solihin, Yan (2009).
In conclusion, the memory hierarchy optimizes computer performance by providing the CPU
with a range of memory levels, each with different characteristics, to balance the need for speed,
capacity, and cost-effectiveness in computing operations. This hierarchy is essential for
improving overall system performance and responsiveness.
REFERENCES
Alan Clements, (2013). Computer Organization & Architecture: Themes and Variations.
Cengage Learning.
Pearson, Tony (2010). "Correct use of the term Nearline": IBM Developer works, Inside
System Storage.
Shane Cook, (2012). CUDA Programming: A Developer's Guide to Parallel Computing with
GPUs. Newnes.
Van der Pas, Ruud (2002). "Memory Hierarchy in Cache-Based Systems": (PDF). Santa
Clara, California: Sun Microsystems: 26. 817-0742-10.