1 . **What is the primary purpose of cache memory?
**
- A) To increase storage capacity
- B) To reduce data retrieval speed
- C) To improve processing speed by storing frequently accessed data
- D) To decrease the cost of memory
2. **Which type of memory access has the fastest access time? **
- A) Sequential access
- B) Direct access
- C) Random access
- D) Associative access
3. **Which mapping technique allows a block of main memory to be loaded into any line
of the
- A) Direct mapping
- B) Associative mapping
- C) Set-associative mapping
- D) Virtual mapping
4. * *In direct mapping, how is the cache line determined for a given block? **
- A) Randomly
- B) Based on a modulus operation
- C) By sequential access
- D) Through a mapping table
5. **What is a key disadvantage of direct mapping? **
- A) Complex
- B) High cost
- C) Conflict misses
- D) Slow access time
6. **Which of the following describes a set-associative cache? **
- A) Blocks can only map to one specific line.
- B) Each block can map to any line in a single set.
- C) Blocks can map anywhere in the cache.
- D) All blocks must be in the same set.
7. **What is the primary advantage of multilevel caches? **
- A) Increased capacity
- B) Reduced access speed
- C) Improved performance by reducing the average memory access time
- D) Simplified cache design
8. **Which write policy writes data immediately to main memory? **
- A) Write-back
- B) Write-through
- C) Write-around
- D) Write-combine
9. ** What happens in a write-back policy when data in cache is modified?**
- A) Data is immediately written to main memory.
- B) Data is only written to main memory when it is replaced.
- C) Data is discarded.
- D) Data is written to another cache level.
10. ** What is the main characteristic of virtual memory?**
- A) Provides larger physical memory
- B) Allows programs to access memory logically, not limited by physical memory size
- C) Increases access speed
- D) Reduces the need for cache
11. **What does the tag field in a cache line represent ?**
- A) The specific data stored
- B) The address of the data in main memory
- C) The size of the cache line
- D) The block number
12. **Which replacement algorithm is the most commonly used due to its effectiveness?
**
- A) Least recently used (LRU)
- B) First-in-first-out (FIFO)
- C) Least frequently used (LFU)
- D) Random
13. **What is the purpose of a victim cache?**
- A) To increase cache capacity
- B) To reduce conflict misses in direct mapped caches
- C) To replace the Ll cache
- D) To store old data
14. **Which cache organization has the potential for the highest hit rate?**
- A) Direct mapping
- B) Associative mapping
- C) Set-associative mapping
- D) Virtual mapping
15. **How does increasing block size in a cache affect hit ratio initially?**
- A) Decreases hit ratio
- B) Has no effect on hit ratio
- C) Increases hit ratio due to spatial locality
- D) Decreases access speed
16. **Which of the following does not affect the design of cache memory?**
- A) Cache size
- B) Mapping function
- C) Replacement algorithm
- D) Processor clock speed
17. **What is the impact of a larger cache size on system performance?**
- A) Always improves performance
- B) Decreases access time
- C) Improves hit rate but may have diminishing returns
- D) No impact on performance
18. **Why are split caches (separate instruction and data caches) beneficial?**
- A) To reduce cache size
- B) To avoid contention between instruction fetch and data access
- C) To simplify cache design
- D) To decrease cost
19. **Which of the following is a disadvantage of larger cache line sizes?**
-A) Increased hit ratio
- B) Reduced hit ratio due to less efficient use of cache
space
- C) Increased speed
- D) Decreased cost
20. **What is the main trade-off in the memory hierarchy? **
- A) Capacity, cost, and access time
- B) Size, power, and speed
- C) Cost, complexity, and design
- D) Security, reliability, and speed
21. **What is a multilevel cache?**
- A) A cache with multiple lines
- B) A hierarchy of caches, with smaller caches closer to the CPU
- C) A cache with virtual memory
- D) A single cache divided into levels
22. **What happens when a cache miss occurs?**
- A) The data is found in the cache
- B) The data must be fetched from the main memory
- C) The cache stops working
- D) The processor halts
23. **What does "hit ratio" refer to in cache memory?**
- A) The percentage of times data is found in the cache
- B) The number of times data is replaced
- C) The speed of data access
- D) The cost of cache memory
24. **Which cache mapping technique uses the least hardware complexity?**
-A) Fully
associative - B) Set-
associative - C)
Direct mapping
- D) Virtual mapping
25. * *Why are replacement algorithms necessary in caches?**
- A) To increase cache size
- B) To manage cache line replacement when it is full
- C) To reduce access time
- D) To improve write policies
26. **Which cache memory principle uses the concept of temporal and spatial locality?**
- A) Cache design
- B) Memory hierarchy
- C) Write policy
- D) Replacement algorithms
27. ** What type of memory is typically used for cache? **
- A) Magnetic memory
- B) Semiconductor memory
- C) Optical memory
- D) Flash memory
28. ** What is the main function of the Memory Management Unit (MMU)?**
- A) To control the processor
- B) To translate virtual addresses into physical addresses
- C) To increase cache speed
- D) To manage disk storage
29. ** What does the term "cache hit" mean? **
- A) Data not found in the cache
- B) Data found in the cache
- C) Data fetched from main memory
- D) A cache line replacement
30. ** Which of the following is true for a unified cache? **
- A) Separate caches for data and instructions
- B) A single cache used for both data and instructions
- C) Only used in multilevel caches
- D) Inefficient for modern CPUs