- The Hit Time is the time required to access a level of the memory hierarchy, including the time needed to determine whether the access is a hit or a miss.
- The Miss Penalty is the time required to fetch a block into a level of the memory hierarchy from the lower level, including (1) the time to access the block, (2) transmit it from one level to the other, (3) insert it in the level that experienced the miss, and then (4) pass the block to the requestor.
Cache Memory
-
Data are transferred between memory and cache in blocks of fixed size, called cache lines or cache blocks
-
The Cache Memory consists of entries (lines)
- Cahce block contains of data (Block size)
- Tag Directory:
- A tag field ( bits)
- A valid bit (1 bit)
-
Cache Size
- Cache size (including: data, tag, valid):
- Cache size (data only):
-
32 bits of address
- () byte offset used for the byte part of the address
- ( bits) block (word) offset
- () index (block)
- () tag
-
- The block address is the address of the block in main memory that contains the word being accessed.
- The number of cache blocks is the number of blocks in the cache.
-
caach line number = mem block number mod
-
-
block offset
-
tag
-
Cache index is used to select the block
-
The size of the tag field is bits.
-
Total number of bits in a direct-mapped cache is