CPSC 422/522: Operating Systems

Homework: memory and processes in xv6

Be sure you have read xv6 chapter 2 and familiarized yourself with the xv6 code it refers to before lecture.

Use QEMU with GDB to trace through the free list creation and memory allocation process described in the first part of the chapter. Make sure you understand how the C pointer arithmetic in kfree's for loop works: especially the relationship between the rp, r, and p variables.

Also step through the creation of the first process by allocproc(), and then step through the first context switch into that process via the assembly language swtch() code.

Nothing to turn in for this lecture.

Bryan Ford, Department of Computer Science, Yale University
[an error occurred while processing this directive] (none)