1. What is the typical relationship between the size and speed of memory levels in the hierarchy, from registers to secondary storage?
A) Size increases, speed decreases
B) Size decreases, speed increases
C) Both size and speed increase
D) Both size and speed decrease
2. Which of the following is a fundamental issue when multiple cores share a single cache?
A) Increased latency for single-threaded applications
B) Potential for cache contention, where cores compete for cache space
C) Reduced overall processing power
D) Elimination of the need for main memory
3. What is the 'working set' of a process in virtual memory management?
A) All the pages of the process
B) The set of pages that the process has accessed recently and is likely to access again soon
C) The pages currently residing in the cache
D) The pages that have been swapped out to disk
4. In a multi-core processor, how can memory bandwidth become a bottleneck?
A) If the CPU cores can process data faster than it can be fetched from or written to memory.
B) If the memory is too small.
C) If the I/O devices are too slow.
D) If the cache memory is not used.
5. Which type of I/O transfer is most suitable for high-speed peripherals like disk drives?
A) Programmed I/O
B) Interrupt-driven I/O
C) Direct Memory Access (DMA)
D) Polling
6. What is a 'memory segment' in some memory management schemes?
A) A fixed-size block of physical memory
B) A contiguous block of memory that has a logical name and is treated as a unit
C) A cache line
D) A virtual page
7. Which of the following is NOT a typical component of the memory hierarchy?
A) CPU Registers
B) Cache Memory (L1, L2, L3)
C) Main Memory (RAM)
D) Graphics Processing Unit (GPU)
8. What is the primary objective of a 'set-associative' cache mapping technique?
A) To allow a main memory block to map to any cache line.
B) To allow a main memory block to map to a specific set of cache lines.
C) To allow a main memory block to map to only one specific cache line.
D) To map blocks based on their content.
9. In memory hierarchy, what is the trade-off between levels?
A) Faster levels are smaller and more expensive per bit; slower levels are larger and cheaper per bit.
B) Faster levels are larger and cheaper per bit; slower levels are smaller and more expensive per bit.
C) All levels have the same speed, size, and cost.
D) There is no trade-off; all memory levels are identical.
10. What is the role of an I/O channel or I/O processor?
A) To increase the computational power of the CPU.
B) To offload I/O management tasks from the main CPU, allowing it to focus on computation.
C) To provide additional RAM to the system.
D) To manage the operating system's kernel.
11. Which of the following best describes the relationship between CPU speed and I/O speed?
A) I/O devices are typically much faster than the CPU.
B) CPU speeds have generally increased faster than I/O speeds, creating a 'CPU-I/O gap'.
C) I/O speeds are always synchronized with CPU speeds.
D) The CPU speed is entirely dependent on the I/O speed.
12. What is the 'thrashing' phenomenon in virtual memory systems?
A) When the system is performing very efficiently with minimal page faults
B) When the system spends more time swapping pages in and out of memory than executing instructions
C) When the CPU is overloaded with too many tasks
D) When the hard disk drive is nearing its full capacity
13. Which of these is a characteristic of RISC (Reduced Instruction Set Computing) architecture that impacts I/O and memory organization?
A) Complex instructions that perform multiple operations
B) Emphasis on load/store architecture, meaning memory access is primarily through explicit load and store instructions
C) Limited number of registers
D) Variable instruction lengths
14. In a multi-processor system, if multiple processors need to access and potentially modify the same memory location, what mechanism is essential to prevent data corruption?
A) Independent memory controllers for each processor
B) A shared, unmanaged memory bus
C) Cache coherence protocols and synchronization primitives (e.g., locks)
D) Increasing the clock speed of all processors
15. What is the purpose of a 'dirty bit' in a cache line or page table entry?
A) To indicate if the data in the cache/page has been modified since it was loaded from main memory
B) To track the temperature of the processor core
C) To mark a page as read-only
D) To indicate that an I/O operation is in progress
16. Which of the following is a consequence of poor locality of reference in a virtual memory system?
A) Increased cache hit rates
B) Reduced number of page faults and faster execution
C) Frequent page faults, leading to excessive disk I/O and slow performance
D) Lower memory access times
17. Consider a system with virtual memory. If a process needs to access a memory address, what is the first step in the translation process?
A) The MMU checks the TLB for a valid translation.
B) The CPU directly accesses the hard drive.
C) The operating system allocates a new physical memory frame.
D) The cache controller fetches data from main memory.
18. What is the main difference between a write-through cache and a write-back cache?
A) Write-through updates main memory immediately; write-back updates main memory only when the cache block is replaced.
B) Write-through uses slower write operations; write-back uses faster write operations.
C) Write-through stores data temporarily; write-back stores data permanently.
D) Write-through is used for instructions; write-back is used for data.
19. In a multi-level cache hierarchy (e.g., L1, L2, L3), where is L1 cache typically located?
A) On the motherboard, shared by all cores
B) On the CPU chip, closest to each individual core
C) On the hard drive
D) Within the main memory modules
20. Which I/O technique involves the CPU issuing a command and then continuing to execute other instructions without waiting for the I/O operation to complete?
A) Programmed I/O
B) Interrupt-driven I/O
C) Direct Memory Access (DMA)
D) Polling
21. What is the function of a Translation Lookaside Buffer (TLB)?
A) To store recently executed instructions
B) To cache recently used page table entries to speed up address translation
C) To manage the allocation of I/O ports
D) To perform floating-point arithmetic operations
22. Which type of memory is volatile and loses its content when power is turned off?
A) Hard Disk Drive (HDD)
B) Solid State Drive (SSD)
C) Random Access Memory (RAM)
D) Read-Only Memory (ROM)
23. What is the primary goal of memory management hardware?
A) To execute user programs faster
B) To facilitate efficient and safe sharing of memory among multiple processes
C) To increase the clock speed of the CPU
D) To manage the flow of data to peripheral devices
24. In memory management, what is the role of a 'page table'?
A) To store the physical addresses of all devices connected to the system
B) To map virtual page numbers to physical frame numbers
C) To track the usage of each byte in main memory
D) To manage the interrupts generated by I/O devices
25. Which of the following is a method for handling false sharing?
A) Increasing the size of cache lines
B) Padding data structures to ensure that data used by different cores is not on the same cache line
C) Disabling write-back policies
D) Using only write-through caches
26. What is a 'false sharing' problem in multi-core processors?
A) When two cores attempt to access the same memory location simultaneously
B) When two cores modify different data items that happen to reside in the same cache line, causing unnecessary cache invalidations
C) When a core accesses data that is not present in its cache
D) When an I/O device attempts to write to a protected memory region
27. Which protocol is commonly used to maintain cache coherence?
A) DMA Protocol
B) Interrupt Protocol
C) Snooping Protocols (e.g., MESI) or Directory-Based Protocols
D) Polling Protocol
28. What does 'cache coherence' refer to in a multi-core system?
A) The speed at which data is transferred between cores
B) Ensuring that all cores have a consistent view of shared memory data, even when it's cached locally
C) The physical arrangement of cores on the processor die
D) The protocol used for I/O device communication
29. Which of the following is a common technique used to manage shared caches in multi-core processors?
A) Each core has its own private, isolated cache
B) Using a single, large cache shared by all cores
C) A hierarchical cache structure with shared last-level caches (LLC)
D) Disabling cache memory for multi-core operations
30. What is a significant challenge introduced by multi-core processors regarding memory?
A) Ensuring that each core has its own dedicated, slow memory
B) Managing shared access to main memory and caches to avoid conflicts and maintain data consistency
C) Reducing the total amount of RAM in the system
D) Eliminating the need for cache memory altogether
31. In a multi-core processor, what is a 'core'?
A) A single transistor within the CPU
B) A complete processing unit capable of executing instructions independently
C) A part of the cache memory
D) A connection port for external devices
32. What is the 'locality of reference' principle, which is crucial for cache and virtual memory performance?
A) Programs tend to access memory locations that are spatially or temporally close to previously accessed locations
B) Memory accesses are always random
C) The CPU always accesses memory in a sequential manner
D) The operating system randomly selects memory blocks to load
33. Which of the following is a common page replacement algorithm?
A) First-In, First-Out (FIFO)
B) Round Robin
C) Shortest Job Next (SJN)
D) Priority Scheduling
34. What is the main advantage of using virtual memory?
A) It eliminates the need for physical RAM
B) It allows for larger programs and more concurrent processes than physical memory alone would permit
C) It makes all memory accesses instantaneous
D) It reduces the power consumption of the CPU
35. Which hardware component is responsible for managing memory access and protection in modern systems?
A) Arithmetic Logic Unit (ALU)
B) Program Counter (PC)
C) Memory Management Unit (MMU)
D) Interrupt Controller
36. What is the purpose of a Memory Management Unit (MMU)?
A) To directly control the CPU's clock speed
B) To manage the physical memory allocation and deallocation
C) To translate virtual memory addresses into physical memory addresses
D) To perform arithmetic and logical operations
37. What is a 'page fault' in the context of virtual memory?
A) When a program tries to access memory that it does not own
B) When the requested page is not currently in physical memory and must be loaded from secondary storage
C) When the virtual memory system runs out of space on the hard drive
D) When the CPU encounters an error while translating virtual addresses
38. Virtual memory typically uses which storage device for its 'backing store'?
A) Fast Solid State Drives (SSDs)
B) Optical Drives (CD/DVD)
C) Magnetic Hard Disk Drives (HDDs) or SSDs
D) RAM modules
39. What is Virtual Memory?
A) A physical memory extension that increases the system's RAM
B) A memory management technique that allows the execution of processes that are larger than the physical main memory
C) A type of cache memory that stores frequently used instructions
D) A secure memory area reserved for the operating system kernel
40. In Fully Associative Mapping, where can a block from main memory be placed in the cache?
A) Only in a specific corresponding location
B) In any available location in the cache
C) In a designated set within the cache
D) In a location determined by the CPU's current task
41. Which mapping technique for cache memory is the simplest to implement but can lead to conflicts?
A) Fully Associative Mapping
B) Set-Associative Mapping
C) Direct Mapping
D) Indirect Mapping
42. What is a 'cache miss'?
A) When the requested data is found in the cache
B) When the requested data is NOT found in the cache and must be fetched from a lower level of the memory hierarchy
C) When the cache memory is full
D) When the CPU encounters an error during cache access
43. Which of the following statements about cache memory is TRUE?
A) Cache memory is typically larger than main memory.
B) Cache memory uses slower technology than main memory.
C) Cache memory holds copies of recently accessed data from main memory.
D) Cache memory is non-volatile.
44. What is the principle behind cache memory?
A) To store infrequently accessed data for quick retrieval
B) To store frequently accessed data from main memory to reduce access time
C) To act as a temporary storage for I/O operations
D) To provide non-volatile storage for the operating system
45. Which level of the memory hierarchy is typically the fastest and smallest?
A) Main Memory (RAM)
B) Secondary Storage (Hard Disk Drive)
C) Cache Memory
D) Registers
46. What is the primary role of the memory hierarchy in a computer system?
A) To increase the physical size of the main memory
B) To reduce the average access time to memory by using multiple levels of storage with different speeds and costs
C) To provide a backup storage for all data in the system
D) To directly connect I/O devices to the CPU
47. Interrupt-driven I/O is generally more efficient than polling when:
A) The I/O device is very fast
B) The I/O device is slow and I/O operations are infrequent
C) The I/O device is slow and I/O operations are frequent
D) The CPU has very little other work to do
48. In the context of I/O handling, what does polling involve?
A) The CPU waiting for an interrupt signal from the I/O device
B) The CPU continuously checking the status of an I/O device to see if it is ready for data transfer
C) The I/O device directly accessing main memory without CPU involvement
D) The CPU sending commands to the I/O device and then proceeding with other tasks
49. What is the main purpose of Direct Memory Access (DMA)?
A) To increase the speed of CPU computation
B) To allow I/O devices to transfer data directly to and from main memory without CPU intervention
C) To provide a faster way for the CPU to access cache memory
D) To manage the virtual memory swapping process
50. Which of the following is a primary function of Input/Output (I/O) controllers?
A) To execute program instructions directly
B) To manage the main memory allocation
C) To translate high-level programming languages into machine code
D) To interface peripheral devices with the CPU and main memory