前言

  1. 实验目的:学习xv6的系统调用流程,并添加新的系统调用,从而进一步的了解xv6的内部结构

  2. 实验准备:

  • 阅读xv6手册《book-riscv-rev1》chapter2 4.3 4.4
  • 系统调用的用户空间代码在user/user.huser/usys.pl中。
  • 内核空间代码是kernel/syscall.hkernel/syscall.c
  • 与进程相关的代码是kernel/proc.hkernel/proc.c
  1. 切换到syscall分支:
1
2
3
$ git fetch
$ git checkout syscall
$ make clean

System call tracing(moderate)