Paging — Concept Check
Questions on Paging. Paging divides virtual memory into fixed-size pages and physical memory into frames, using a page table to translate virtual addresses to physical addresses, eliminating external fragmentation.
Questions in this quiz
8 questions on Paging — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A process is experiencing slow memory access times. The `vmstat` output shows a high number of page faults. What is likely happening?
- AThe process is experiencing CPU bottlenecks, not memory issues.
- BThe process is suffering from internal fragmentation, slowing down access.
- CThe process has a large number of TLB hits, slowing down access.
- DThe process is frequently accessing pages not in memory, causing disk reads.
2.In a 64-bit system using 4-level paging, what happens if a virtual address does not have a corresponding entry in the page table?
- AThe MMU automatically allocates a new page frame for the address.
- BThe system crashes because the address is invalid.
- CThe virtual address is mapped to a default memory location.
- DThe MMU generates a page fault, and the OS may load the page into memory.
3.A developer notices that their application is slow and `vmstat` shows low CPU usage but high `si`/`so` values. What is the likely cause?
- AThe application has a memory leak, consuming all available RAM.
- BThe system is heavily swapping pages between memory and disk.
- CThe application is CPU-bound, causing low CPU usage.
- DThe system is experiencing high network latency.
4.Why are multi-level page tables used in modern systems?
- ATo increase the speed of address translation.
- BTo reduce the memory required for storing page tables.
- CTo eliminate internal fragmentation in memory.
- DTo simplify the process of memory allocation.
5.A system with 4 KB pages and 4-level paging has a virtual address split into 9-9-9-9-12 bits. What does the 12-bit section represent?
- AThe index into the first-level page table.
- BThe size of the page table entry.
- CThe page number in the virtual address.
- DThe offset within the page frame.
6.A developer claims that increasing the number of TLB entries will eliminate all page faults. Why is this incorrect?
- ATLB entries cache translations, but page faults occur when pages are not in memory.
- BTLB entries increase CPU speed, not memory access efficiency.
- CTLB entries directly manage memory allocation, eliminating page faults.
- DTLB entries are responsible for handling disk I/O operations.
7.During a code review, a colleague suggests that page size should be increased to reduce external fragmentation. What is the flaw in this reasoning?
- APaging eliminates external fragmentation by design.
- BLarger pages increase internal fragmentation, not external.
- CLarger pages reduce the number of page table entries needed.
- DPage size does not affect fragmentation at all.
8.What is the primary role of the Translation Lookaside Buffer (TLB) in a paging system?
- ATo cache recent address translations and speed up memory access.
- BTo store the entire page table for quick access.
- CTo handle page faults and load pages into memory.
- DTo manage the allocation of physical memory frames.