Lab Manual 2: Operating System
Lab Manual 2: Operating System
This lab is about xv6 which is little and beautiful kernel perfect for study and usage. The goal of
the project is to add a system call to xv6. The system call that you will made should look
something like this:
int getsyscallinfo(void)
Specifically, you need to add one counter that increments every time a system call is made. The
counter should be incremented before each time a system call is issued; when getsyscallinfo() is
called, the calling program can thus discover how many total system calls have been made.
Your system call returns the number of calls made since the system booted on success, and -1 on
failure.
The count for a system call should only be incremented before the call is finished executing, not
after.