This document show how you can extend the xv6 kernel by a new system call, getppid(). We do this by modifying the syscall.h, syscall.c and sysproc.c files in the kernel code and modifying user.h and usys.S in the user space code.
The xv6 kernel, henceforth referred to as the kernel, is a re-implementation of the unix version 6 kernel. Originally written by Dennis Ritchie and Ken Thompson in 1975 using the C programming language. The kernel targets two architectures: x86 and risc-v . this document focuses on the x86 version. Xv6 is an operating system developed in 2006 by MIT for educational purposes. It is used in MIT’s undergraduate course: CS 6.1810: Operating Systems Engineering . The complete implementation of xv6 is around 6000 lines of code which makes it ideal to study and understand the main concepts of an (unix) operating system.
If you want to play around with the kernel you will need the f