Memory Hierarchy
Multiprogramming:
Read-only memory (ROM)
Bootstrap loader and Computer startup
Auxiliary Memory
The most common auxiliary memory devices used in computer
systems are magnetic disks and tapes. Other components used, but
not as frequently, are magnetic drums, magnetic bubble memory, and
optical disks. The important characteristics of any device are its access
mode, access time, transfer rate, capacity, and cost.
Associative Memory
• The time required to find an item stored in memory can be
reduced considerably if stored data can be identified for access
by the content of the data itself rather than by an address.
• A memory unit accessed by content is called an associative
memory or content addressable memory (CAM). This type of
memory is accessed simultaneously and in parallel on the basis
of data content rather than by specific address or location.
• If a word is written in an associative memory, no address is
given. The memory is capable of finding an empty unused
location to store the word.
• When a word is to be read from an associative memory, the
content of the word, or part of the word, is specified. The
memory locates all words which match the specified content
and marks them for reading.
Because of its organization, the associative memory is uniquely
suited to do parallel searches by data association. Moreover,
searches can be done on an entire word or on a specific field within
a word. An associative memory is more expensive than a random
access memory because each cell must have storage capability as
well as logic circuits for matching its content with an external
argument. For this reason, associative memories are used in
applications where the search time is very critical and must be very
short.
Word 2 matches the unmasked argument field because the
three leftmost bits of the argument and the word are
equal.
Cache Memories
Processor is much faster than the main memory.
As a result, the processor has to spend much of its time waiting while instructions
and data are being fetched from the main memory.
Major obstacle towards achieving good performance.
Speed of the main memory cannot be increased
beyond a certain point.
Cache memory is an architectural arrangement
which makes the main memory appear faster to
the processor than it really is.
Cache memory is based on the property of
computer programs known as “locality of
reference”.
Locality of Reference
Analysis of programs indicates that many
instructions in localized areas of a program
are executed repeatedly during some period
of time, while the others are accessed
relatively less frequently.
These instructions may be the ones in a loop, nested loop or few procedures
calling each other repeatedly.
This is called “locality of reference”.
Temporal locality of reference:
Recently executed instruction is likely to be executed again very soon.
Spatial locality of reference:
Instructions with addresses close to a recently executed instruction are likely
to be executed soon.
The fundamental idea of cache organization is that by keeping
the most frequently accessed instructions and data in the fast
cache memory, the average memory access time will approach
the access time of the cache. Although the cache is only a small
fraction of the size of main memory, a large fraction of memory
requests will be found in the fast cache memory because of the
locality of reference property of programs.
Hit Ratio
FIFO