随笔分类 -  《操作系统导论》homework

摘要:1. 页表大小随虚拟地址空间增加,随页面大小减小 页面太大了,不就变成了分区吗,就有外部碎片了 2. 百分比增加,valid的变多 3. 我也没看出有什么不妥 可能前两个组合对于虚拟地址空间来说太大了,最后一个组合又太小了?? 4. 想让程序不正常运行,可以让虚拟地址空间比内存大,或者虚拟地址空间大 阅读全文
posted @ 2023-03-27 16:04 穿过雾的阴霾 阅读(16) 评论(0) 推荐(0) 编辑
摘要:1. 随着free的次数增加,空闲列表的元素个数增加,因为不会合并,每次分配内存时,开销也增大,内存碎片增加 2. 采用最差匹配策略,空闲列表的元素个数增加了。因为每次选择与请求大小最不接近的块进行分配,因此大概率是分割已有的大块空闲空间,因此空闲列表元素个数一般不会减少,会产生更多碎片 3. 不用 阅读全文
posted @ 2023-03-22 13:36 穿过雾的阴霾 阅读(20) 评论(0) 推荐(0) 编辑
摘要:1. 运行程序无事发生 #include <sys/types.h> #include <unistd.h> #include <iostream> using namespace std; int main() { int *x = NULL; free(x); return 0; } 2. gd 阅读全文
posted @ 2023-03-16 20:03 穿过雾的阴霾 阅读(30) 评论(0) 推荐(0) 编辑
摘要:1. #include <sys/types.h> #include <unistd.h> #include <iostream> using namespace std; int main() { int x = 100; cout << x << endl; int pid = fork(); 阅读全文
posted @ 2023-03-16 19:32 穿过雾的阴霾 阅读(9) 评论(0) 推荐(0) 编辑
摘要:1. python3 ./lottery.py -s 1 -c python3 ./lottery.py -s 2 -c python3 ./lottery.py -s 3 -c 2. 估计压根不会运行,如此不平衡导致进程饿死 python3 ./lottery.py -l 10:1,10:100 阅读全文
posted @ 2023-03-16 14:43 穿过雾的阴霾 阅读(5) 评论(0) 推荐(0) 编辑
摘要:1.限制作业长度并关闭IO python3 mlfq.py -j 2 -n 2 -c python3 mlfq.py --jlist 0,10,0:0,5,0 -n 2 -c 2.实现书上示例 python3 mlfq.py -l 0,200,0 -c python3 mlfq.py -l 0,20 阅读全文
posted @ 2023-03-12 16:27 穿过雾的阴霾 阅读(34) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示