Title: CSE 351 23au / LS18 Memory & Caches III

Q: How do we find the number of bits to represent each byte of a block (width of the offset field)?
k = log_2(___)
A: k = log_2(K)
k: width of the offset field
K: block size

Q: How do we find the number of bits to represent each block index in the cache (width of the index field)?
s = log_2(___)
A: s = log_2(C/K)
s = width of index field
C = cache size
K = block size
C/K = number of blocks

Q: How do we find the number of remaining bits that uniquely define an address width of the tag field)?
t = m ___ s ___ k, where m is an m-bit address
A: t = m - s - k
t = tag field
s = index field
k = offset field

Q: The number of slots per cache set is defined as a cache’s ___
A: associativity

Q: Under E-way associativity, what is the cache divided into?
A: sets
cache sets with E blocks in each set

Q: Given a 2-way associative cache of 8 blocks:
    How many sets are in the cache?
    How many blocks are in each set?
A: 4 sets, 2 blocks per set

Q: The opposite extreme to direct-mapped, where the entire cache is treated as a single set is known as ___
A: fully associative

Q: Is it easier/faster or harder/slower to check for and place a block with less associativity?
A: easier / faster
However, it would result in more frequent conflicts between the blocks because the placement of the blocks is more restricted

Q: Is it easier/faster or harder/slower to check for and place a block with more associativity?
A: harder / slower
But, it would reduce the number of conflicts between blocks because there are more valid locations for the blocks

Q: One of the management bits that tells us if the current data in the cache slot is valid program data or mystery data is known as the ___
A: valid bit (V)

Q: The valid bit (V) is a ___ if the data is program data and ___ if it’s not
A: 1 (program data), 0 (mystery data)

Q: What do we call a cache with no valid program data?
A: Cold cache

Q: If the desired set we want to copy our block of data into is full, how do we determine which block to replace?
A: Least recently used (LRU) replacement policy
This helps maximize temporal locality

Q: Collectively, the extra information about a block of data’s state is known as the ___
A: management bits

Q: The combination of management bits and the block data is known as the ___
A: cache line