Virtual Memory Basics
What is the primary purpose of virtual memory?
- To allow programs to use more memory than is physically available.
- To directly manage physical memory allocation.
- To replace the hard drive with RAM.
- To improve CPU processing speed.
- To decrease memory access time.
Paging Process
In a paging system, what is a page?
- A fixed-size block of physical memory.
- A variable-sized block of virtual memory.
- A fixed-size block of virtual memory.
- A segment of code within a function.
- A unit of data transferred between CPU and cache.
Swapping Mechanics
What is the main purpose of swapping in memory management?
- To move processes temporarily out of main memory to a backing store.
- To permanently delete processes from the system.
- To move data between different CPU registers.
- To directly increase the size of RAM.
- To exchange data between cache levels.
Page Table Structure
What does a page table typically store?
- The mapping between virtual addresses and physical addresses.
- The size of the hard drive.
- The list of all running processes.
- The CPU's current instruction set.
- The network configuration settings.
Thrashing Scenario
Which of the following best describes thrashing?
- A state where a process spends more time swapping pages than executing instructions.
- A technique for speeding up memory access.
- A process performing excessive I/O operations.
- A memory leak in a program.
- The physical damage of memory chips.
Translation Lookaside Buffer (TLB)
What is the purpose of the Translation Lookaside Buffer (TLB)?
- To cache recent translations between virtual and physical addresses.
- To store the operating system kernel.
- To manage network connections.
- To buffer disk writes.
- To enhance CPU clock speed.
Page Fault Handling
What action is triggered when a page fault occurs?
- The operating system retrieves the missing page from secondary storage.
- The system immediately crashes.
- The CPU switches to a different process.
- The current process is terminated.
- The cache memory is cleared.
Demand Paging Implementation
What is demand paging?
- Loading pages into memory only when they are needed.
- Loading all pages into memory at the start of a process.
- Deleting pages from memory when they are no longer needed.
- Using a fixed-size page table.
- Allocating memory in contiguous blocks.
Page Replacement Algorithms
Which of the following is a common page replacement algorithm?
- Least Recently Used (LRU).
- First Come First Serve (FCFS).
- Shortest Job First (SJF).
- Round Robin (RR).
- Highest Priority First (HPF).
Benefits of Virtual Memory
Which of the following is a significant benefit of using virtual memory?
- Increased memory utilization and the ability to run larger programs than physical memory allows.
- Elimination of all memory management overhead.
- Direct access to physical memory without operating system intervention.
- Guaranteed prevention of memory leaks.
- Increased CPU clock speed.