xv6 reading homework

Throughout this semester, we expect that you will read the entire implementation of the xv6 kernel, accompanied by the xv6 book, which explains the rationale and design underlying the kernel's implementation. (The source code is also available as a Lions-style PDF)

For this lecture, read the following files in the xv6 kernel implementation:

In exec.c:loadseg(), the kernel looks up a physical address pa and then directly passes it to readi(), which writes data to that address as if it was a pointer. How is the kernel able to write to physical memory addresses, rather than virtual memory addresses? What line of code allows this to work?

You may find chapter 3 of the book useful in understanding how the kernel uses page tables.

Submit your answer in an ASCII text file named homework.txt to the corresponding "Lecture N" assignment on Gradescope.


Questions or comments regarding 6.1810? Send e-mail to the course staff at 61810-staff@lists.csail.mit.edu.

Creative Commons License