Guided Practice for Sections 9.6 and 9.7.2 (Virtual Address Translation)
In this reading we’ll look in more detail at the process of translating virtual addresses to physical addresses. As part of this discussion, we’ll explore the performance impact of address translation and look at two ways to optimize this process. Finally, we’ll get a quick look at how the Linux kernel handles virtual memory, including the important data structures that it uses for address translation.
Sections 9.6 (excluding 9.6.4) and 9.7.2 (pp. 813-821, 828-832) from the course textbook.
Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. The reading quiz will test these objectives.
task_struct
, mm_struct
, and vm_area_struct
.vm_area_struct
struct.The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
vm_task_struct
data structures for a process and a virtual address, determine if the page fault handler will result in either a segmentation fault or a protection exception.These exercises are geared towards mastering the BASIC learning objectives listed above. You are expected to submit them before class and it is highly recommended that you complete them before attempting the reading quiz.
How does address translation differ when there is a TLB versus when there is not a TLB.
How does our interpretation of a virtual page number differ between a single-level page table and a multi-level page table?
What are the common Linux virtual memory areas for a process?
For each of the following Linux VM structs, list whether there is one or more of each struct for a single process. For each answer, explain why.
task_struct
:mm_struct
:vm_area_struct
:How does the Linux page fault handler determine whether there is a segmentation fault?