Cache Memory
Cache Memory
Cache Memory
Cache memory
• Organisation
Capacity
• An obvious characteristic of memory is its capacity.
• For internal memory, this is typically expressed in terms of bits (1
byte 8 bits) or words.
• Common word lengths are 8, 16, and 32 bits.
• External memory capacity is typically expressed in terms of bytes.
Memory Accessing Methods
• Another distinction among memory types is the method of accessing
units of data. These include the following:
• Sequential
• Direct
• Random
• Associative
Sequential
• Memory is organized into units of data, called records.
• Access must be made in a specific linear sequence.
• Stored addressing information is used to separate records and assist
in the retrieval process.
• A shared read–write mechanism is used.
• Thus, the time to access an arbitrary record is highly variable.
• Tape units, are sequential access.
Direct access
• As with sequential access, direct access involves a shared read–write
mechanism.
• However, individual blocks or records have a unique address based on
physical location.
• Access is accomplished by
• direct access to reach a general vicinity plus sequential searching, counting, or
waiting to reach the final location.
• Again, access time is variable. Disk units, are direct access.
Random access
• Each addressable location in memory has a unique, physically wired-
in addressing mechanism.
• The time to access a given location is independent of the sequence of
prior accesses and is constant.
• Thus, any location can be selected at random and directly addressed
and accessed.
• Main memory and some cache systems are random access.
Associative
• This is a random access type of memory that enables one to make a
comparison of desired bit locations within a word for a specified
match.
• Thus, a word is retrieved based on a portion of its contents rather
than its address.
• As with ordinary random-access memory, each location has its own
addressing mechanism,
• and retrieval time is constant independent of location or prior access
patterns.
• Cache memories may employ associative access.
Performance
• From a user’s point of view, the two most important characteristics of
memory are
• capacity and performance.
• Three performance parameters are used:
• Access time
• Time between presenting the address and getting the valid data
• Memory Cycle time
• Time may be required for the memory to “recover” before next access
• Cycle time is access + recovery
• Transfer Rate
• Rate at which data can be moved
Cache-
Physical Types, Characteristics and organization
Physical Types Physical Organization
• Semiconductor Characteristics • Physical arrangement of
• RAM • Decay bits into words
• Magnetic • Volatility • Not always obvious
• Disk & Tape • Erasable • e.g. interleaved
• Optical • Power consumption
• CD & DVD
• Others
In referring to the basic unit of the cache, the term line is used,
rather than the term block, for two reasons:
(1) to avoid confusion with a main memory block, which contains the
same number of data words as a cache line; and
(2) because a cache line includes not only K words of data, just as a
main memory block, but also include tag and control bits
Cache Read Operation - Flowchart
Typical Cache Organization