LectEPE2206 8 DMA UART MemoryHierarchy
LectEPE2206 8 DMA UART MemoryHierarchy
Microprocessors
DMA
UART
Memory Hierarchy
Hard Drives/Magnetic Discs
Users want very fast, very large, and very cheap memory.
These requirements are contradictory, so this is not possible.
The solution is to have various types of memory, differing in
speed, size and cost:
• Register memory.
The smallest, fastest, and most expensive.
• Cache memory.
This is used to hold copies of the most frequently used data.
• Main memory.
The principal storage area for programs and data.
• Secondary memory.
Holds programs and data not currently used.
Usually magnetic discs. Largest, slowest, and cheapest.
Each can transfer data to/from above and below. Cost and
speed decrease going down the list.
Cache Memory
This is intended to bridge the gap between:
• The high speed, but small capacity of registers.
• The high capacity, but slow speed of main memory.
A cache exploits the principle of locality:
programs have many loops, so they tend to execute
the same small set of instructions repeatedly.
Principle:
Cache Memory (2)
The cache is faster than main memory, but smaller.
It is slower than registers, but larger.
What Access time Capacity
Registers 1 ns 1 Kb
Cache 10 ns 8 Mb
Main memory 100 ns 8 Gb
Hard drive 10000000 ns 4 Tb