Prepare for the 241 Computer Science Certification Exam with comprehensive flashcards and multiple choice questions. Enhance knowledge with explanations and hints to excel in your test journey!

Multiple Choice

Which statement accurately describes how caches use locality principles in memory systems?

Caches take advantage of two locality patterns: temporal locality, where data that was just used is likely to be used again soon, and spatial locality, where nearby data will be accessed next. To balance speed and size, memory is organized in levels—small, fast caches close to the CPU (L1), a larger, still-fast cache (L2), and often an even larger L3 cache. The statement that best describes this combines both locality types with the hierarchical organization, which is exactly how caches operate in real systems. The other options omit or contradict these ideas: caches do use spatial locality as well as temporal locality; the levels exist precisely to leverage locality efficiently; and data replacement follows policies based on usage and capacity, not solely on whether the program uses new data.

Caches take advantage of two locality patterns: temporal locality, where data that was just used is likely to be used again soon, and spatial locality, where nearby data will be accessed next. To balance speed and size, memory is organized in levels—small, fast caches close to the CPU (L1), a larger, still-fast cache (L2), and often an even larger L3 cache. The statement that best describes this combines both locality types with the hierarchical organization, which is exactly how caches operate in real systems. The other options omit or contradict these ideas: caches do use spatial locality as well as temporal locality; the levels exist precisely to leverage locality efficiently; and data replacement follows policies based on usage and capacity, not solely on whether the program uses new data.