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:

and also skim the implementation of processes in the following files:

Suppose that an xv6 kernel has used up all of the struct proc entries in the struct proc proc[NPROC] table (i.e., none of them have state == UNUSED). What happens if one of the processes calls exec()? What happens if one of the processes calls fork()? What happens if one of the processes calls kill() on an existing PID and then calls fork()?

You may find chapter 2 of the book useful in understanding the overall kernel structure and what a process implementation looks like.

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