Practice 25 Memory Systems multiple-choice questions designed for CDAC CCAT exam preparation. Click "Show Answer" to reveal the correct option with detailed explanation.
Show Answer & Explanation
Correct Answer: D — Register
Hierarchy: Registers > Cache > RAM > SSD/HDD.
Show Answer & Explanation
Correct Answer: A — Between CPU and RAM
Cache is between CPU and main memory for faster access.
Show Answer & Explanation
Correct Answer: B — Data found in cache
Cache hit: requested data is found in cache.
Show Answer & Explanation
Correct Answer: B — Locality of reference
Cache exploits temporal and spatial locality of reference.
Show Answer & Explanation
Correct Answer: A — Block can go anywhere
Fully associative: any block can be in any cache line.
Show Answer & Explanation
Correct Answer: B — Block has one fixed location
Direct mapped: each block has exactly one possible cache location.
Show Answer & Explanation
Correct Answer: B — Writes to cache and memory simultaneously
Write-through updates both cache and main memory on every write.
Show Answer & Explanation
Correct Answer: B — Writes to cache, updates memory later
Write-back: writes to cache, updates memory only when evicted.
Show Answer & Explanation
Correct Answer: C — SRAM is faster, no refresh needed
SRAM is faster and doesn't need refresh; used for cache. DRAM needs refresh.
Show Answer & Explanation
Correct Answer: B — Non-volatile
ROM (Read Only Memory) is non-volatile - retains data without power.
Show Answer & Explanation
Correct Answer: C — Registers
Registers are located within the CPU and have the fastest access time, typically less than 1 nanosecond.
Show Answer & Explanation
Correct Answer: B — Programs tend to access the same or nearby memory locations repeatedly
Locality principle states that programs tend to access the same data (temporal locality) or nearby data (spatial locality) repeatedly.
Show Answer & Explanation
Correct Answer: B — DRAM
DRAM (Dynamic RAM) stores data in capacitors that leak charge, requiring periodic refresh to maintain data.
Show Answer & Explanation
Correct Answer: B — Translate virtual addresses to physical addresses
The MMU translates virtual addresses used by programs to physical addresses in actual memory.
Show Answer & Explanation
Correct Answer: B — In one specific cache line only
In direct-mapped cache, each memory block can only go to one specific cache line determined by its address.
Show Answer & Explanation
Correct Answer: B — Least Recently Used
LRU (Least Recently Used) replaces the cache block that has not been accessed for the longest time.
Show Answer & Explanation
Correct Answer: B — Using hard disk space as an extension of RAM
Virtual memory uses secondary storage (hard disk) to extend the apparent size of physical RAM.
Show Answer & Explanation
Correct Answer: B — Required page is not in physical memory
A page fault occurs when a program accesses a page that is not currently in physical memory, requiring it to be loaded from disk.
Show Answer & Explanation
Correct Answer: B — Registers > Cache > RAM > Hard Disk
The memory hierarchy from fastest to slowest is: Registers > Cache > RAM > Hard Disk/SSD.
Show Answer & Explanation
Correct Answer: B — Indicates the cache line has been modified and differs from main memory
The dirty bit indicates that the cache line has been modified (written to) and needs to be written back to main memory before replacement.
Show Answer & Explanation
Correct Answer: C — Combination of direct and associative - cache divided into sets
Set-associative cache divides cache into sets, where a block maps to a specific set but can go in any line within that set.
Show Answer & Explanation
Correct Answer: B — Time taken to load data from main memory on a miss
Cache miss penalty is the additional time required to fetch data from main memory when data is not found in cache.
Show Answer & Explanation
Correct Answer: B — Electrically Erasable Programmable ROM
EEPROM is Electrically Erasable Programmable ROM - can be erased and reprogrammed using electrical signals.
Show Answer & Explanation
Correct Answer: B — Recently accessed data is likely to be accessed again soon
Temporal locality means that data that has been recently accessed is likely to be accessed again in the near future.
Show Answer & Explanation
Correct Answer: B — Data near recently accessed locations is likely to be accessed soon
Spatial locality means that if a memory location is accessed, nearby memory locations are likely to be accessed soon.