Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: summary for stage 3 #632

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 2024秋冬开源操作系统训练营第三阶段总结-陈栩民
date: 2024-11-30 21:20:01
categories:
- 2024秋冬季开源操作系统训练营
tags:
- author:yumu20030130
---


# Unikernel

Unikernel,可以认为就是一个免去了US间特权级切换的简单内核,在阅读源码和解决部分课后习题的过程中,我将自己的想法与收获总结如下:
1. Unikernel的基本启动流程:https://yumu20030130.github.io/2024/11/25/Unikernel%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%90%AF%E5%8A%A8%E6%B5%81%E7%A8%8B/
2. Unikernel组件之axalloc:https://yumu20030130.github.io/2024/11/25/Unikernel%E7%BB%84%E4%BB%B6%E4%B9%8Baxalloc/
3. Unikernel组件之paging:https://yumu20030130.github.io/2024/11/25/Unikernel%E7%BB%84%E4%BB%B6%E4%B9%8Bpaging/
4. Unikernel组件之axtask:https://yumu20030130.github.io/2024/11/25/Unikernel%E7%BB%84%E4%BB%B6%E4%B9%8Baxtask/

# 宏内核

Unikernel加上用户态与内核态的分离,便形成了宏内核,其中我认为最重要的便是理解从内核态创建并执行一个应用,以及应用陷入内核的时候,又发生了什么。
1. 最简宏内核模式内核构建:https://yumu20030130.github.io/2024/11/30/%E6%9C%80%E7%AE%80%E5%AE%8F%E5%86%85%E6%A0%B8%E6%A8%A1%E5%BC%8F%E5%86%85%E6%A0%B8%E6%9E%84%E5%BB%BA/

# HyperVisor

HyperVisor,即所谓的虚拟机管理程序,从代码实现来看,和宏内核思想差不多,都是一个高特权级的“内核”为低特权级的“应用”创建独属于它的“虚拟空间”,为它准备对应的资源,然后切换特权级去执行该“应用”。当“应用”发生“中断”的时候,就trap回“内核”处理。GuestOS,就像是一个特殊的应用。

1. Debug-版本错误:https://yumu20030130.github.io/2024/11/30/Debug-OpenSBI%E7%89%88%E6%9C%AC%E9%94%99%E8%AF%AF/

# 总结

通过这段时间的学习,我对于如何将内核组件化、以及如何从Unikernel到宏内核和HyperVisor有了更深入的理解。
HyperVisor及部分基础组件相关的学习总结还未来得及形成文档,后续也将逐步更新在本人的博客网页:https://yumu20030130.github.io/
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: 2024秋冬开源操作系统训练营第四阶段总结-陈栩民
date: 2024-12-21 10:50:01
categories:
- 2024秋冬季开源操作系统训练营
tags:
- author:yumu20030130
---

# 总结

在该阶段中,我完成了前期的练习,着重学习了ArceOS宏内核模式下是如何支持Linux应用的,并期望基于此,实现劫持ecall以在Unikernel形态下支持Linux应用。虽然这个方案最终感觉不太可行,但在这个过程中,我还是学到了很多系统相关的知识,收获颇丰,期待下一次的训练营!

# 一些建议
这个项目阶段个人感觉时间还是太短了,且靠近学期末。如果可以把项目阶段放到假期,或者把前期训练阶段放到假期、把项目阶段放到学期开始,可能大家的参与度都会更高一些。

# 总结报告详情
个人博客网页:https://yumu20030130.github.io/
行文匆忙,多有不严谨之处,后续会在个人博客中完善。
1. Unikernel内核模式下支持Linux多应用的前期准备:https://yumu20030130.github.io/2024/12/21/Unikernel%E5%86%85%E6%A0%B8%E6%A8%A1%E5%BC%8F%E4%B8%8B%E6%94%AF%E6%8C%81Linux%E5%A4%9A%E5%BA%94%E7%94%A8%E7%9A%84%E5%89%8D%E6%9C%9F%E5%87%86%E5%A4%87/

2. ArceOS宏内核模式基本应用支持:https://yumu20030130.github.io/2024/11/30/%E6%9C%80%E7%AE%80%E5%AE%8F%E5%86%85%E6%A0%B8%E6%A8%A1%E5%BC%8F%E5%86%85%E6%A0%B8%E6%9E%84%E5%BB%BA/

3. ArceOS宏内核模式如何支持Linux应用的运行:https://yumu20030130.github.io/2024/12/20/ArceOS%E5%AE%8F%E5%86%85%E6%A0%B8%E6%A8%A1%E5%BC%8F%E5%A6%82%E4%BD%95%E6%94%AF%E6%8C%81Linux%E5%BA%94%E7%94%A8%E7%9A%84%E8%BF%90%E8%A1%8C/


4. Unikernel模式尝试劫持ecall以支持Linux应用运行:https://yumu20030130.github.io/2024/12/20/Unikernel%E6%A8%A1%E5%BC%8F%E5%B0%9D%E8%AF%95%E5%8A%AB%E6%8C%81ecall%E4%BB%A5%E6%94%AF%E6%8C%81Linux%E5%BA%94%E7%94%A8%E8%BF%90%E8%A1%8C/