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 xv6 implementation of a simple Unix program, cat, available here. How does the system keep track of the connection between the string filename argv[i] passed to open(), and the resulting integer file descriptor fd? What does the integer file descriptor number refer to?
You might find it helpful to read chapter 1 of the xv6 book, which provides an overview of a Unix-like operating system. For your amusement, you can also watch a historic AT&T film about Unix.
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.