Memory Hierarchy Design and Its Characteristics
Memory Hierarchy Design and Its Characteristics
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 :
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.
Advantages of Memory Hierarchy
It helps in removing some destruction, and managing the memory in a
better way.
It helps in spreading the data all over the computer system.
It saves the consumer’s price and time.
System-Supported Memory Standards
According to the memory Hierarchy, the system-supported memory
standards are defined below:
Level 1 2 3 4
Main Secondary
Name Register Cache
Memory Memory
DRAM
Implementati Multi- On-chip/
(capacitor
on ports SRAM Magnetic
memory)
0.25ns to 80ns to
Access Time 0.5 to 25ns 50 lakh ns
0.5ns 250ns
20000 to 5000 to
Bandwidth 1000 to 5000 20 to 150
1 lakh MB 15000
System System
from
Backing From from Main
Secondary from ie
Mechanism cache Memory
Memory
Memory Hierarchy
A memory unit is an essential component in any digital computer since it is needed for
storing programs and data.
1. The memory unit that establishes direct communication with the CPU is called Main
Memory. The main memory is often referred to as RAM (Random Access Memory).
2. The memory units that provide backup storage are called Auxiliary Memory. For instance,
magnetic disks and magnetic tapes are the most commonly used auxiliary memories.
Apart from the basic classifications of a memory unit, the memory hierarchy consists all of
the storage devices available in a computer system ranging from the slow but high-capacity
auxiliary memory to relatively faster main memory.
A magnetic disk is a digital computer memory that uses a magnetization process to write,
rewrite and access data. For example, hard drives, zip disks, and floppy disks.
Magnetic tape is a storage medium that allows for data archiving, collection, and backup for
different kinds of data.
Main Memory
The main memory in a computer system is often referred to as Random Access Memory
(RAM). This memory unit communicates directly with the CPU and with auxiliary memory
devices through an I/O processor.
The programs that are not currently required in the main memory are transferred into
auxiliary memory to provide space for currently used programs and data.
I/O Processor
The primary function of an I/O Processor is to manage the data transfers between auxiliary
memories and the main memory.
Cache Memory
The data or contents of the main memory that are used frequently by CPU are stored in the
cache memory so that the processor can easily access that data in a shorter time.
Whenever the CPU requires accessing memory, it first checks the required data into the
cache memory. If the data is found in the cache memory, it is read from the fast memory.
Otherwise, the CPU moves onto the main memory for the required data.
We will discuss each component of the memory hierarchy in more detail later in this
chapter.
Main Memory
The main memory acts as the central storage unit in a computer system. It is a relatively
large and fast memory which is used to store programs and data during the run time
operations.
The primary technology used for the main memory is based on semiconductor integrated
circuits. The integrated circuits for the main memory are classified into two major units.
1. RAM (Random Access Memory) integrated circuit chips
2. ROM (Read Only Memory) integrated circuit chips
The primary compositions of a static RAM are flip-flops that store the binary information.
The nature of the stored information is volatile, i.e. it remains valid as long as power is
applied to the system. The static RAM is easy to use and takes less time performing read
and write operations as compared to dynamic RAM.
The dynamic RAM exhibits the binary information in the form of electric charges that are
applied to capacitors. The capacitors are integrated inside the chip by MOS transistors. The
dynamic RAM consumes less power and provides large storage capacity in a single
memory chip.
RAM chips are available in a variety of sizes and are used as per the system requirement.
The following block diagram demonstrates the chip interconnection in a 128 * 8 RAM chip.
o A 128 * 8 RAM chip has a memory capacity of 128 words of eight bits (one byte) per
word. This requires a 7-bit address and an 8-bit bidirectional data bus.
o The 8-bit bidirectional data bus allows the transfer of data either from memory to CPU
during a read operation or from CPU to memory during a write operation.
o The read and write inputs specify the memory operation, and the two chip select (CS)
control inputs are for enabling the chip only when the microprocessor selects it.
o The bidirectional data bus is constructed using three-state buffers.
o The output generated by three-state buffers can be placed in one of the three possible
states which include a signal equivalent to logic 1, a signal equal to logic 0, or a high-
impedance state.
The following function table specifies the operations of a 128 * 8 RAM chip.
From the functional table, we can conclude that the unit is in operation only when CS1 = 1
and CS2 = 0. The bar on top of the second select variable indicates that this input is
enabled when it is equal to 0.
A ROM memory is used for keeping programs and data that are permanently resident in the
computer.
Apart from the permanent storage of data, the ROM portion of main memory is needed for
storing an initial program called a bootstrap loader. The primary function of the bootstrap
loader program is to start the computer software operating when power is turned on.
ROM chips are also available in a variety of sizes and are also used as per the system
requirement. The following block diagram demonstrates the chip interconnection in a 512 *
8 ROM chip.
o A ROM chip has a similar organization as a RAM chip. However, a ROM can only
perform read operation; the data bus can only operate in an output mode.
o The 9-bit address lines in the ROM chip specify any one of the 512 bytes stored in it.
o The value for chip select 1 and chip select 2 must be 1 and 0 for the unit to operate.
Otherwise, the data bus is said to be in a high-impedance state.