Virtual Memory & Address Space — Concept Check
Questions on Virtual Memory & Address Space. Virtual memory gives each process the illusion of a large, private address space by mapping virtual pages to physical frames, allowing processes larger than physical RAM to run.
Questions in this quiz
8 questions on Virtual Memory & Address Space — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A developer notices that their Java application is consuming more memory than expected. They have set -Xmx to 4 GB. What could be a reason for this?
- AHeap memory is leaking due to improper garbage collection.
- B-Xmx also controls the stack size of each thread.
- CThe JVM uses additional memory for metaspace and thread stacks.
- DThe -Xmx flag limits total memory usage, including metaspace.
2.A system administrator observes high page faults when a large file is accessed. What is likely happening?
- AThe file is fragmented, causing access delays.
- BThe system is low on RAM, causing swapping.
- CThe file is memory-mapped, causing demand paging.
- DThe file is read in small chunks, increasing faults.
3.A developer is confused about their 64-bit system's address space. They believe it provides 64 TB of virtual memory. What is the correct understanding?
- A64-bit systems provide 64 GB of virtual memory.
- B64-bit systems provide 4 GB of virtual memory.
- C64-bit systems provide 128 TB of virtual memory.
- D64-bit systems provide 32 TB of virtual memory.
4.A Java application running with -XX:+UseCompressedOops is observed. What is the benefit of using this option?
- AIt increases the speed of garbage collection.
- BIt allows for larger object sizes in the heap.
- CIt compresses the entire heap to save space.
- DIt reduces heap memory usage for pointer-heavy objects.
5.A developer is debugging a segmentation fault in their application. Which of these is a likely cause?
- AUsing uninitialized variables.
- BWriting to a read-only text segment.
- CRunning out of heap memory.
- DAccessing kernel space from user mode.
6.A developer is confused about the BSS segment. They think it stores initialized data. What is the correct role of the BSS segment?
- AIt stores zero-initialized global variables.
- BIt stores initialized global variables.
- CIt stores executable code.
- DIt stores dynamically allocated memory.
7.An application is experiencing slowdowns, and `vmstat` shows high `si`/`so` values. What does this indicate?
- AHigh swap activity due to insufficient RAM.
- BDisk I/O bottlenecks slowing down processes.
- CNetwork latency issues affecting performance.
- DHigh CPU usage due to intensive computation.
8.On a 32-bit system, a developer tries to allocate 5 GB of memory for a process. What will happen?
- AThe allocation succeeds with reduced performance.
- BThe allocation fails due to the 4 GB limit.
- CThe process uses memory-mapped files to extend memory.
- DThe system uses swap to accommodate the request.