1/19
A set of practice questions covering virtual memory concepts, address translation, multi-level page tables, and administrative details for a systems programming assignment.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is the purpose of the 2310 NetProxy tool in Assignment 3?
It sits between the client and the server, relaying information between them so the user can see exactly what is being sent and received.
In the demo server, what happens when the process receives a SIGHUP signal?
The server prints the current stats (such as connected clients and tokens evaluated) to standard error.
What is the function of the A3 stats port in the assignment?
The server spawns a separate thread to listen on a designated port (e.g., 5555) specifically for stats clients.
What is Copy on Write (COW)?
An optimization where a child and parent process share the same memory after a fork; a page is only copied when one of the processes attempts to write to it, triggering a page fault.
Define a Kibibyte (KiB) in terms of bytes.
A Kibibyte is equal to 210 bytes, which is 1024 bytes.
What are the power-of-two definitions for Mebibytes, Gibibytes, Tebibytes, and Pebibytes?
Mebibyte (MiB) is 220, Gibibyte (GiB) is 230, Tebibyte (TiB) is 240, and Pebibyte (PiB) is 250 bytes.
What is the difference between biological reality and the virtual memory analogy?
Virtual memory gives a process the view of a massive library with neatly ordered pages, whereas physical memory is often a much smaller library shared by many processes (people) simultaneously.
What is the Memory Management Unit (MMU)?
A hardware component that translates virtual addresses used by the CPU into physical addresses in RAM or secondary storage.
Distinguish between a 'page' and a 'frame'.
A page is a fixed-size block of the virtual address space, while a frame is a fixed-size block of physical RAM.
How are the page number and the offset determined from a virtual address?
The page number is the virtual address divided by the page size (page=page sizevirtual address), and the offset is the virtual address modulo the page size (offset=virtual address mod page size).
What information is typically stored in a Page Table Entry (PTE)?
The physical frame number it maps to, permission bits (read, write, execute), and the page state.
Why is the virtual page number not explicitly stored inside a page table entry?
It is implicit based on the location of the entry within the page table, increasing memory efficiency.
What is the Translation Lookaside Buffer (TLB)?
A fast, associative content-addressable memory cache that stores recent page-to-frame mappings to speed up address translation.
What occurs during a 'Thrashing' state?
A condition under high memory pressure where the system spends more time swapping pages between disk and RAM than executing actual work.
Why does dereferencing a null pointer cause a segmentation fault?
Page zero and other very low-numbered pages are marked as invalid in the page table, and hardware generates a fault when they are accessed.
What is the primary benefit of using multi-level page tables?
They reduce memory overhead by allowing the top-level table to have empty entries, meaning the system does not need to store mappings for unused parts of the virtual address space.
In a system with 48-bit virtual addresses, 4196 byte pages (212), and 8 byte page table entries, how many bits are used for each level of a 4-level page table?
There is a 12-bit offset and 9 bits for each of the four levels (12+9+9+9+9=48).
What does the SBREKE system call do?
It changes the data segment size (program break) to allocate or deallocate memory for the process heap.
What is PROC PID maps?
A virtual file in Linux that shows the memory layout of a specific process, including the text segment, heap, shared libraries, and stack.
What is Address Space Layout Randomization (ASLR)?
A security feature that varies the precise location of the heap and stack every time a process is run to prevent attackers from targeting specific addresses.