6.s081

Lab 1 Xv6 and Unix utilities

  • sleep使用系统调用sleep和库函数atoi完成
  • pingpong使用系统调用pipe,fork,read,write,getpid完成
  • primes使用系统调用pipe,fork,read,write,wait完成
  • find参考ls对文件属性的查看,修改代码实现
  • xargs使用系统调用read,write,fork,exec实现

官方实验目的:This lab will familiarize you with xv6 and its system calls.

我看到的实验目的:

  1. 明白utils是通过使用系统调用实现
  2. 熟悉系统调用

Lab 2 System calls

  • trace系统调用通过为proc结构体添加新的属性mask,在内核函数syscall中添加打印信息实现
  • sysinfo系统调用通过添加内核函数get_freemem,get_nproc,统计后使用内核函数copyout将结构体传出

官方实验目的:In the last lab you used system calls to write a few utilities. In this lab you will add some new system calls to xv6, which will help you understand how they work and will expose you to some of the internals of the xv6 kernel. You will add more system calls in later labs.

我看到的实验目的:

  1. 通过修改内核代码实现系统调用,对内核代码结构有大概的了解
  2. 用户态内存与内核态内存的切换:trace中mask从用户态传到内核态,无传出;sysinfo中sysinfo指针从用户态传到内核态,通过copyout将内核态的结构体复制到指针指向的内存

Lab 3  Page tables

  • 加速ugetpid系统调用:为结构体proc添加usyscall属性,将物理地址映射到USYSCALL(一个固定的虚拟地址),参考trapframe实现
  • 打印page table:

官方实验目的:In this lab you will explore page tables and modify them to speed up certain system calls and to detect which pages have been accessed.

我看到的实验目的:

  1. 理解page table
  2. 理解虚拟内存与物理内存的关系
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值