Skip to content

add blog of Shiver for stage 1 and stage 2 #627

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"server": "hexo server"
},
"hexo": {
"version": "7.0.0"
"version": "7.3.0"
},
"dependencies": {
"hexo": "^4.2.1",
Expand All @@ -25,4 +25,4 @@
"hexo-renderer-stylus": "^1.1.0",
"hexo-server": "^1.0.0"
}
}
}
43 changes: 43 additions & 0 deletions source/_posts/rCore24-blog-stage1-2-Shiver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: rCore24_blog_stage1-2_Shiver
date: 2024-11-23 18:28:54
categories:
- operating system
tags:
- rCore
- Rust
- os development
tags:
---

# 阶段1-目标与晋级条件

- 为学习操作系统的设计与实现奠定扎实的 Rust 编程基础。

- 通过完成 100 道 Rustlings 编程题,深入强化 Rust 编程技能。

- 在阶段排行榜上取得满分,即可晋级至专业阶段学习。

# 阶段1-个人总结

通过Rust官方的线上教程掌握了Rust语言的相关语法。关于"borrow", "move", "life time"的概念初次接触来感觉有点晦涩,但熟练使用后就非常容易理解。同时RAII的思想不仅对后续的操作系统开发提供了许多帮助,也在其他语言的项目开发上有了莫大的启示。

# 阶段2-目标与晋级条件

- 从零开始构建操作系统的各个模块,不断完善操作系统核心功能

- 完成5道rCore操作系统大实验编程题,深入领会OS重要概念,掌握必备技能

- 排行榜积分达到500分,方可进入项目阶段学习,参与团队合作完成关键任务


# 阶段2-个人总结
从0开始实现了一个简单的操作系统,我将分点简单阐述以下我的心得体会。

- 了解了Sbi这一衔接层。本阶段中使用的Sbi的Rust实现包装了许多硬件接口来方便我们的编码,这是分层思想的一种体现。

- 通过将一个`Arc`的`Weak`指针转换为`Strong`,根据转换的结果是不是`None`来判断`Arc`里面的对象还有没有被引用,这种对Rust语言特性的运用很巧妙。

- 在`persistence`章节中将`easy-fs`和`os`主体实现了解耦,写成了两个分开的项目,是十分巧妙的代码设计。一来简化了`os`下的代码,使其关注业务逻辑,二来也为未来实现`easy-fs`以外的文件系统提供了便利。

- 在`persistence`章节中,官方为`Inode`实现了`read_at`和`modify_at`的method,这个接口设计的非常好,十分灵活且能让开发者专注于程序逻辑。