Memory Hierarchy - main memory, auxiliary memory, associative memory, cache memory, virtual memory, memory management hardware - Question Bank

1. Which of the following is a form of non-volatile memory commonly used as auxiliary memory?
A) SRAM
B) DRAM
C) Flash Memory (SSD)
D) ROM
2. What is the role of the operating system in managing virtual memory?
A) To directly execute instructions from secondary storage.
B) To manage page tables, page faults, and page replacement algorithms.
C) To control the speed of the CPU.
D) To handle all data transfers between CPU and peripherals.
3. Which memory type is generally the slowest but offers the largest storage capacity?
A) Cache Memory
B) Main Memory (RAM)
C) Auxiliary Memory (e.g., HDD)
D) Registers
4. What is the purpose of the 'dirty bit' associated with a cache line or page?
A) To indicate if the data has been read.
B) To track the number of times the data has been accessed.
C) To indicate if the data in the cache/page has been modified and needs to be written back to the lower memory level.
D) To mark the data as invalid.
5. In a typical memory hierarchy, which level is placed between cache memory and auxiliary memory?
A) CPU Registers
B) Main Memory (RAM)
C) Virtual Memory
D) Read-Only Memory (ROM)
6. What is the advantage of using a 'segmented' virtual memory system over a 'paged' system?
A) Simpler memory management.
B) Easier sharing of code and data segments between processes.
C) Faster address translation.
D) Reduced fragmentation.
7. Which component performs the actual translation of virtual addresses to physical addresses?
A) CPU's Control Unit
B) Memory Management Unit (MMU)
C) Cache Controller
D) Direct Memory Access (DMA) Controller
8. The concept of 'temporal locality' in memory access suggests that:
A) Recently accessed data items are likely to be accessed again soon.
B) Data items located near recently accessed items are likely to be accessed soon.
C) Memory addresses are accessed in a strict sequential order.
D) Data is only accessed once.
9. Which memory is characterized by its ability to be searched based on its data content rather than its address?
A) Cache Memory
B) Main Memory
C) Associative Memory
D) Auxiliary Memory
10. What is the primary role of the 'page replacement algorithm' in virtual memory management?
A) To determine which virtual page to load into memory.
B) To decide which page in physical memory to remove when a new page needs to be loaded and memory is full.
C) To allocate physical frames to processes.
D) To manage the TLB.
11. In a multi-level cache system (e.g., L1, L2, L3), where is the fastest cache located?
A) L3 Cache
B) L2 Cache
C) L1 Cache
D) Main Memory
12. What is the main advantage of using DRAM over SRAM for main memory?
A) Faster access times
B) Lower cost per bit and higher density
C) Simpler circuitry
D) Lower power consumption
13. What is the main advantage of using SRAM over DRAM for cache memory?
A) Lower cost per bit
B) Higher density (more storage per chip)
C) Faster access times
D) Non-volatility
14. Which of the following statements about virtual memory is FALSE?
A) It allows programs to use more memory than physically available.
B) It uses secondary storage to hold parts of programs not currently in RAM.
C) It always results in faster execution speeds compared to systems without virtual memory.
D) It requires hardware support like an MMU.
15. What is the primary trade-off when designing a memory hierarchy?
A) Speed vs. Cost
B) Capacity vs. Volatility
C) Access Method vs. Power Consumption
D) Data Integrity vs. Read/Write Speed
16. Which memory technology is typically used for Solid State Drives (SSDs)?
A) DRAM
B) SRAM
C) NAND Flash Memory
D) Magnetic Storage
17. What is the 'miss penalty' in the context of cache memory?
A) The time taken to access data that is present in the cache.
B) The time required to detect a cache hit.
C) The additional time required to fetch data from a lower level of the memory hierarchy when a cache miss occurs.
D) The time taken to update main memory.
18. What is the 'hit time' in the context of cache memory?
A) The time taken to transfer data from main memory to cache.
B) The time required to access data that is present in the cache.
C) The time taken to detect a cache miss.
D) The time required to write data back to main memory.
19. How does a Translation Lookaside Buffer (TLB) improve virtual memory performance?
A) It stores recently used data blocks.
B) It speeds up the translation of virtual addresses to physical addresses by caching page table entries.
C) It directly fetches data from the hard disk.
D) It manages the swapping of pages between RAM and disk.
20. Which of the following is a direct consequence of a low cache hit ratio?
A) Faster program execution.
B) Increased demand on main memory bandwidth.
C) Reduced power consumption.
D) Lower CPU utilization.
21. What is the purpose of 'memory interleaving'?
A) To increase the capacity of main memory.
B) To reduce the average memory access time by allowing concurrent access to different memory banks.
C) To provide non-volatility to main memory.
D) To implement virtual memory.
22. The Memory Management Unit (MMU) is typically part of the:
A) Hard Disk Controller
B) CPU
C) Graphics Processing Unit (GPU)
D) Network Interface Card (NIC)
23. Virtual memory allows a system to run programs larger than its physical RAM by using:
A) Faster CPU processing.
B) More cache memory.
C) Secondary storage (like HDD/SSD) as an extension of RAM.
D) Specialized graphics memory.
24. Which memory characteristic makes it suitable for storing the operating system kernel and active applications?
A) High capacity and low cost (Auxiliary Memory)
B) Fast access speed and volatility (Main Memory)
C) Extremely high speed and small capacity (Cache Memory)
D) Content-addressability (Associative Memory)
25. What is the primary function of 'auxiliary memory'?
A) To provide fast access to frequently used data.
B) To store data and programs permanently or semi-permanently.
C) To act as a buffer between CPU and main memory.
D) To hold currently executing instructions.
26. Which memory level is considered the 'main memory' or 'primary memory' in most computer systems?
A) CPU Registers
B) Cache Memory
C) Random Access Memory (RAM)
D) Solid State Drive (SSD)
27. What is the 'write-back' policy in cache memory management?
A) Data is written to both the cache and main memory simultaneously.
B) Data is written only to the cache and updated in main memory only when the cache line is replaced.
C) Data is written only to main memory.
D) Data is written to cache only if it's a write hit.
28. What is the 'write-through' policy in cache memory management?
A) Data is written only to the cache and updated in main memory later.
B) Data is written to both the cache and main memory simultaneously.
C) Data is written only to main memory.
D) Data is written to cache only if it's a read miss.
29. In the context of cache memory, what does 'spatial locality' refer to?
A) If a memory location is accessed, it is likely to be accessed again soon.
B) If a memory location is accessed, nearby memory locations are likely to be accessed soon.
C) Memory accesses are evenly distributed across the entire address space.
D) The CPU accesses instructions in a sequential manner.
30. Which memory type is typically read-only and used to store firmware like the BIOS?
A) RAM
B) Cache
C) ROM
D) Hard Disk
31. What is the main purpose of 'memory management hardware' like the MMU?
A) To speed up arithmetic operations.
B) To handle input/output device communication.
C) To enforce memory protection and manage address translation.
D) To synchronize CPU clock cycles.
32. Which of the following is NOT a typical component of the memory hierarchy?
A) Registers
B) Cache Memory
C) Main Memory
D) Input/Output Ports
33. What is the consequence of 'thrashing' in a virtual memory system?
A) Significantly improved system performance.
B) Excessive paging activity, leading to poor performance.
C) The system runs out of disk space.
D) The CPU operates at its maximum speed.
34. A high 'hit ratio' in cache memory indicates:
A) Most memory accesses result in a cache miss.
B) Most memory accesses find the data in the cache.
C) The cache is too small for the workload.
D) The main memory is faulty.
35. What is the role of the 'page table' in a virtual memory system?
A) To store frequently accessed data for quick retrieval.
B) To map virtual page numbers to physical frame numbers.
C) To manage the allocation and deallocation of disk space.
D) To detect and correct errors in memory access.
36. Which memory technology offers the highest speed but also the highest cost per bit?
A) DRAM
B) SRAM
C) NAND Flash
D) Magnetic Disks
37. What is the primary characteristic of 'main memory'?
A) It is non-volatile and has a very large capacity.
B) It is volatile, relatively fast, and used for active program execution.
C) It is extremely fast but has a very small capacity.
D) It is used for long-term data storage.
38. Which type of memory is typically implemented using DRAM (Dynamic Random-Access Memory)?
A) Cache Memory
B) Main Memory (RAM)
C) Hard Disk Drive
D) Solid State Drive
39. Which type of memory is typically implemented using SRAM (Static Random-Access Memory)?
A) Main Memory
B) Auxiliary Memory
C) Cache Memory
D) ROM
40. What is a 'page fault' in the context of virtual memory?
A) A hardware error in the RAM.
B) When the requested data is not found in main memory.
C) When the CPU executes an invalid instruction.
D) A successful data transfer from cache to CPU.
41. Which hardware component is specifically designed to manage the translation of virtual addresses to physical addresses?
A) Arithmetic Logic Unit (ALU)
B) Control Unit
C) Memory Management Unit (MMU)
D) Interrupt Controller
42. What is the term for the process of moving data from auxiliary memory to main memory when it is needed by a program in a virtual memory system?
A) Caching
B) Swapping
C) Paging
D) Thrashing
43. Which principle allows virtual memory to work by extending the addressable memory space beyond the physical RAM?
A) Data Locality
B) Memory Mapping
C) Paging and Swapping
D) Direct Memory Access (DMA)
44. Cache memory bridges the speed gap between the CPU and which other component?
A) Hard Disk Drive
B) Main Memory
C) Graphics Card
D) Network Interface Card
45. Associative memory is also known as Content-Addressable Memory (CAM). What is its key feature?
A) It is addressed by its physical location.
B) It is addressed by its content.
C) It is primarily used for long-term storage.
D) It has the slowest access time.
46. What is the main advantage of auxiliary memory (like hard drives) over main memory?
A) Faster access speed
B) Lower cost per bit and non-volatility
C) Direct CPU access
D) Higher bandwidth
47. Which type of memory is volatile, meaning it loses its data when power is turned off?
A) Auxiliary Memory (HDD/SSD)
B) Cache Memory
C) Main Memory (DRAM/SRAM)
D) ROM
48. Which level of the memory hierarchy typically has the fastest access time and smallest capacity?
A) Main Memory (RAM)
B) Auxiliary Memory (Hard Disk)
C) Cache Memory
D) Virtual Memory
49. What is the primary purpose of a memory hierarchy in computer systems?
A) To increase the physical size of memory
B) To reduce the average access time to memory
C) To decrease the cost per bit of storage
D) To improve data transfer rates between CPU and I/O devices