Memory Hierarchy — Concept Check
Questions on Memory Hierarchy. The memory hierarchy arranges storage from fastest and smallest (registers) to slowest and largest (network storage), exploiting the principle of locality to make programs run efficiently.
Questions in this quiz
8 questions on Memory Hierarchy — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A program is frequently accessing a loop counter variable. Where is this data most likely stored for fast access?
- ACPU registers
- BNetwork storage
- CL3 cache
- DRAM
2.While optimizing a Java application, you notice frequent cache misses during linked list traversal. What is causing this?
- ATemporal locality
- B64-byte cache lines
- CContiguous memory access
- DPointer-chasing across heap
3.Which storage layer in the memory hierarchy is both large and cheap but also the slowest?
- AL3 cache
- BNetwork storage
- CL1 cache
- DCPU registers
4.A developer is considering using arrays over linked lists for a performance-critical section. Why might this be beneficial?
- ALinked lists are faster for sequential access
- BArrays reduce memory usage
- CArrays are cache-friendly due to contiguous memory
- DLinked lists use less memory
5.A program experiences a 100x slowdown when accessing data. What might be the cause if the data access pattern is random?
- AEfficient use of cache lines
- BData stored in CPU registers
- CCache misses due to pointer-chasing
- DTemporal locality optimization
6.In a performance analysis, you find that warm data is mostly accessed. Where is this data likely stored?
- AL1/L2 cache
- BHDD
- CCPU registers
- DNetwork storage
7.A developer believes that accessing data from SSD is faster than from RAM. What is the correct understanding?
- ASSD speed depends on cache
- BBoth have similar speeds
- CRAM is faster than SSD
- DSSD is faster than RAM
8.Which principle explains why accessing sequential memory addresses in an array is efficient?
- ASpatial locality
- BNetwork latency
- CCache line size
- DTemporal locality