chapter 8 Flashcards
(20 cards)
: What is the primary purpose of cache memory?
- A) To increase the capacity of main memory
- B) To reduce the average memory access time
- C) To provide non-volatile storage
- D) To replace main memory entirely
- B) To reduce the average memory access time
In a direct-mapped cache, where can a specific memory block be placed?
- A) In any cache line
- B) In a specific cache line determined by the address
- C) In any cache line within a specific set
- D) Only at the beginning or end of the cache
B) In a specific cache line determined by the address
What is the hit ratio in cache memory?
- A) The ratio of cache size to main memory size
- B) The ratio of hits to total memory accesses
- C) The ratio of misses to total memory accesses
- D) The ratio of read operations to write operations
B) The ratio of hits to total memory accesses
: Which cache mapping technique offers the highest flexibility in placing memory blocks?
- A) Direct mapping
- B) Set-associative mapping
- C) Fully associative mapping
- D) Block mapping
C) Fully associative mapping
What is the principle of locality in cache memory?
- A) Cache should be physically close to the CPU
- B) Programs tend to access memory locations that are close to each other
- C) Cache lines should be organized in a local manner
- D) Cache should only store local variables
B) Programs tend to access memory locations that are close to each other
In a 4-way set-associative cache, how many cache lines can a specific memory block be placed in?
- A) 1
- B) 4
- C) Any line in the cache
- D) Depends on the cache size
B) 4
: Which of the following is NOT a common cache replacement policy?
- A) Least Recently Used (LRU)
- B) First-In-First-Out (FIFO)
- C) Most Recently Used (MRU)
- D) Random Replacement
C) Most Recently Used (MRU)
What is a cache coherence problem?
- A) When the cache becomes full
- B) When multiple caches have different values for the same memory location
- C) When the cache access time is too high
- D) When the cache size is too small
B) When multiple caches have different values for the same memory location
Which write policy immediately updates both cache and main memory on a write operation?
- A) Write-through
- B) Write-back
- C) Write-allocate
- D) Write-around
A) Write-through
What is the primary advantage of a write-back policy over a write-through policy?
- A) Simpler implementation - B) Reduced write traffic to main memory - C) Better cache coherence - D) Higher reliability
B) Reduced write traffic to main memory
What is the purpose of a victim cache?
- A) To store blocks that have been replaced from the main cache - B) To store frequently accessed blocks - C) To store blocks that have never been accessed - D) To store blocks that contain errors
A) To store blocks that have been replaced from the main cache
Which of the following best describes temporal locality?
- A) If a memory location is accessed, nearby locations are likely to be accessed soon - B) If a memory location is accessed, it is likely to be accessed again soon - C) Memory locations are accessed in a sequential manner - D) Memory locations are accessed based on their physical location
B) If a memory location is accessed, it is likely to be accessed again soon
In a cache with a block size of 64 bytes, what is the primary advantage of increasing the block size?
- A) Improved hit ratio due to spatial locality - B) Reduced cache size - C) Faster access time - D) Simplified cache design
A) Improved hit ratio due to spatial locality
: What is the tag in a cache memory system?
- A) A unique identifier for each cache line - B) The part of the address that identifies which block is stored in a cache line - C) The data stored in the cache - D) The replacement policy used
B) The part of the address that identifies which block is stored in a cache line
: Which of the following is NOT a factor affecting cache performance?
- A) Cache size - B) Block size - C) Associativity - D) CPU clock speed
D) CPU clock speed
What happens in a write-allocate policy when a write miss occurs?
- A) The block is loaded into the cache, then updated - B) The write goes directly to main memory, bypassing the cache - C) The write is delayed until the block is naturally replaced - D) The write operation is cancelled
A) The block is loaded into the cache, then updated
What is the primary purpose of a multilevel cache hierarchy?
- A) To increase the total cache capacity - B) To balance access time and hit ratio - C) To simplify cache management - D) To reduce power consumption
B) To balance access time and hit ratio
: Which of the following is a characteristic of L1 cache compared to L2 cache?
- A) Larger size - B) Higher associativity - C) Faster access time - D) Lower hit ratio
C) Faster access time
: What is the primary disadvantage of a fully associative cache?
- A) Poor hit ratio - B) Complex hardware for tag comparison - C) Limited flexibility in block placement - D) Incompatibility with modern processors
B) Complex hardware for tag comparison
Which of the following best describes spatial locality?
- A) If a memory location is accessed, it is likely to be accessed again soon - B) If a memory location is accessed, nearby locations are likely to be accessed soon - C) Memory locations are accessed based on their importance - D) Memory locations are accessed in a random manner
B) If a memory location is accessed, nearby locations are likely to be accessed soon