摘要:
LAB:xv6 lazy page allocation 1.实验概述 本节的实验内容是给xv6加上一个延迟分配内存的功能,具体内容为,在用户态调用系统调用sys_bark时,只设置进程控制块中内存大小,不进行具体分配,等待用户需要使用上次调用的内存时,会产生一个pagefault,此时在中断处理程 阅读全文
摘要:
1.RISC-V assembly 1.a2, a1 store 12(f(8)+1) 2.26: 45b1 li a1,12 3.0x630 4.0x30 5.He110 World; i = 0x726c6400; no 6.之前a2中保存的值 2.Backtrace 关键:怎么判断用户栈超出栈 阅读全文
摘要:
lab pagetable 1、print a pagetable void vmprint_helper(pagetable_t pagetable, int depth) { static char* indent[] = { "", "..", ".. ..", ".. .. .." }; i 阅读全文
摘要:
lab System calls 0、time 4 hours 1、trace // 1.在user/user.h中加上trace函数定义 int trace(int); // 2.在user/usys.pl中加上trace的entry脚本 entry("trace"); // 3.在kernel/ 阅读全文
摘要:
lab utilities 1、sleep // // Created by silly on 23-9-5. // #include "../kernel/types.h" #include "../kernel/stat.h" #include "../user/user.h" int main 阅读全文
摘要:
mit6.s081lab环境搭建 1、写在前面 前些天写了cmu15-213的lab并看了csapp,现在打算开一下操作系统,写一下mit6.s081的lab,因为理论部分学过几遍了,所以打算花一个月的时间写完这11个lab。 2、环境搭建 我使用的版本是mit6.s081的2020版,因为网上能参 阅读全文
摘要:
proxy lab phase 1 简单代理服务 1、分析 实现代理功能:接收客户端的请求,发送给服务器,再接收服务器的响应,返回给客户端 HTTP请求的格式 读10、11章,知道各种函数的作用 2、代码 #include "csapp.h" /* You won't lose style poin 阅读全文
摘要:
Malloclab Summary 1、writeup mm_init : 调用 mm_init 来执行任何必要的初始化,比如分配初始堆区域。如果在执行初始化时出现问题,返回值应为 -1,否则为0。 mm_malloc : malloc总是返回8字节对齐的指针。 2、隐式空闲链表+firstfit 阅读全文
摘要:
Shelllab Summary ps:对全局变量的访问要屏蔽所有信号,我没加。 1、eval /* * eval - Evaluate the command line that the user has just typed in * * If the user has requested a 阅读全文
摘要:
Cachelab Summary part A 仔细阅读一下writeup,大概可以知道partA的任务是: 在cism.c中写代码模拟实现一下cache,要求的格式中参数[h,v]为可选,我们可以不管,最后实现成以下这样的操纵即可 linux> ./csim -s 4 -E 1 -b 4 -t t 阅读全文