diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246.md" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246.md" new file mode 100644 index 0000000000..2b7891814f --- /dev/null +++ "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246.md" @@ -0,0 +1,55 @@ +--- +title: 2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武 +date: 2024-11-12 16:36:32 +categories: + - report +tags: + - 2024秋冬季开源操作系统训练营 + - 第三阶段 +--- +# 记得恢复package.json + +# 主要内容 +## 组件化内核实验路线 +* 第一周 组件化内核基础和Unikernel模式(以下4部分压缩合并到3次课) +内核组件化基本概念、思路和框架 (U.1) +内存管理 - 分页、地址空间(U.3)和动态内存分配(U.2) +任务调度 - 任务与运行队列(U.4)、协作式调度(U.5) 、 抢占式调度(U.6) +块设备驱动(U.7)和文件系统(U.8) +* 第二周 宏内核扩展(其中第3次课由郑友捷老师讲,内容待定) +从Unikernel到宏内核的扩展 (M.1) +用户地址空间管理和页面异常(M.2) +进程和Linux应用支持(M.3) +* 第三周 Hypervisor扩展 +从Unikernel到宏内核的扩展 (H.1) +Guest地址空间管理(H.2) +VMExit各类情况处理与设备管理 (H.3) +![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_20-59-50.png) +![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_20-59-42.png) +![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_21-03-29.png) +## ArceOS框架 +除了运行需要的基本工具外,其他所有东西都可以以组件的形式添加到内核中,通过rust提供的feature,能够自行选择需要的组件,实现内核最小化运行。 +axfeat是一个空的feature,用来汇聚所有的feature。 +![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_21-18-34.png) +![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_21-23-20.png) + + + +## 作业 +### ![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_16-57-27.png) +在println!宏定义处添加颜色输出控制信息。 +### ![alt text](./2024秋冬季开源操作系统训练营第三阶段总结报告-侯文武/Snipaste_2024-11-12_17-11-06.png) +hashbrown有在no_std模式下使用的hashmap,在axstd文件夹下进行修改。 +Cargo.toml中添加依赖`hashbrown = "0.15"` +axstd/src/lib.rs 将原来的 alloc::collections删除 +添加 mod collections +在src下创建文件夹collections,在mod.rs中添加如下代码, +``` +#[cfg(feature = "alloc")] +#[doc(hidden)] +pub use hashbrown::HashMap as HashMap; +``` +需要为hashmap添加全局分配器,所以要引入alloc,否则会报出如下错误 +``` +error: no global memory allocator found but one is required; link to std or add `#[global_allocator]` to a static item that implements the GlobalAlloc trait +``` \ No newline at end of file diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-37-51.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-37-51.png" new file mode 100644 index 0000000000..50129f7fd7 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-37-51.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-57-27.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-57-27.png" new file mode 100644 index 0000000000..1407b67b25 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_16-57-27.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_17-11-06.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_17-11-06.png" new file mode 100644 index 0000000000..c3cf1ffebf Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_17-11-06.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-42.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-42.png" new file mode 100644 index 0000000000..a49dad9c54 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-42.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-50.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-50.png" new file mode 100644 index 0000000000..593acecd1b Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_20-59-50.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-03-29.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-03-29.png" new file mode 100644 index 0000000000..84ba831c40 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-03-29.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-17-28.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-17-28.png" new file mode 100644 index 0000000000..95868044b0 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-17-28.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-18-34.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-18-34.png" new file mode 100644 index 0000000000..da8a46150b Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-18-34.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-23-20.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-23-20.png" new file mode 100644 index 0000000000..50c2d6a9dc Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-12_21-23-20.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-28-35.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-28-35.png" new file mode 100644 index 0000000000..acd59777b1 Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-28-35.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-58-20.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-58-20.png" new file mode 100644 index 0000000000..58797d343e Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_20-58-20.png" differ diff --git "a/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_21-00-11.png" "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_21-00-11.png" new file mode 100644 index 0000000000..42b0b9f28f Binary files /dev/null and "b/source/_posts/2024\347\247\213\345\206\254\345\255\243\345\274\200\346\272\220\346\223\215\344\275\234\347\263\273\347\273\237\350\256\255\347\273\203\350\220\245\347\254\254\344\270\211\351\230\266\346\256\265\346\200\273\347\273\223\346\212\245\345\221\212-\344\276\257\346\226\207\346\255\246/Snipaste_2024-11-15_21-00-11.png" differ