6.828 Homework 5 xv6 CPU alram

作业地址 整个作业根据给出的 Hint 完成就行 创建 alarmtest.c 文件,添加代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include "types.h"#include "stat.h"#include "user.h" void periodic(); int main(int argc, char *argv[]) { int i; printf(1, "alarmtest starting\n"); alarm(10, periodic); for (i = 0; i <

6.828 Lab 1 Booting a PC

实验地址 Exercise 3 Q1 At what point does the processor start executing 32-bit code? What exactly causes the switch from 16- to 32-bit mode? boot/boot.S 中有代码: 1 2 3 # Jump to next instruction, but in 32-bit code segment. # Switches processor into 32-bit mode. ljmp $PROT_MODE_CSEG, $protcseg ljmp $PROT_MODE_CSEG, $protcseg 表示从这里用一个长跳转进

6.828 Homework 4 xv6 Lazy page allocation

作业地址 Part One: Eliminate allocation from sbrk() 1 2 3 4 5 6 7 8 9 10 11 12 13 14 int sys_sbrk(void) { int addr; int n; if(argint(0, &n) < 0) return -1; myproc()->sz += n; addr = myproc()->sz; /* if(growproc(n) < 0) */ /* return -1; */ return addr; } 重新编译执行 echo hi 后出现下面的错