-
Notifications
You must be signed in to change notification settings - Fork 452
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
Hubert Rust&rCore Stage Report #619
Open
Hubert-cumt
wants to merge
1
commit into
rcore-os:master
Choose a base branch
from
Hubert-cumt:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+58
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: Hubert阶段总结 | ||
date: 2024-11-12 22:45:15 | ||
tags: Rust OS rCore | ||
--- | ||
|
||
## Hubert Rust&rCore Stage Report | ||
|
||
在开源操作系统夏令营中,我完成了两个阶段的学习任务,获得了对Rust语言以及基于Rust特性OS的基本认识。 | ||
|
||
**阶段一:Rust语言基础学习** | ||
|
||
在第一阶段中,通过Rustlings项目,我系统地学习了Rust语言的基础知识。这一阶段帮助我掌握了Rust的核心特性,包括所有权模型、借用与生命周期、模式匹配、错误处理等概念。 | ||
|
||
Rust独特的内存安全模型对我启发很大,它不仅改变了我对传统编程语言内存管理的理解,还让我意识到内存安全对系统编程的重要性。 | ||
|
||
Rust在不依赖垃圾回收的前提下实现了安全、高效的内存管理,让我感到惊讶,并对Rust在系统编程领域的应用前景充满期待。 | ||
|
||
**阶段二:rCore操作系统学习** | ||
|
||
第二阶段是基于rCore教学操作系统的学习,这是一个基于Rust编写的简化操作系统,通过五个Lab的实战让我体验了操作系统的基本模块和原理。 | ||
|
||
1. **Lab1** | ||
CH3虽然讲的是多道程序与分时多任务,但是Lab1更注重的是功能的解耦与抽象,如果关注过SICP会发现,Lab1考察的主要地方是模块的独立以及函数权限的划分,某部分功能写在哪个模块里需要稍微思考一下,虽然在Lab1中这种考察非常简单以至于略一思考即可写出解耦的代码,但是后续的Lab会逐渐加深抽象和模块解耦的意义。 | ||
|
||
2. **Lab2** | ||
地址空间管理是操作系统的核心之一,Lab2 引入了一整套的虚拟内存机制,通过这一Lab了解了分页机制、虚拟内存映射的原理,通过读Virtual Address与Physical Address的相关代码让我对内存管理的理解更加深入。 | ||
|
||
另外,从这里开始,大量运用了懒加载结合RAII的思想来对全局变量管理器进行初始化,这种策略结合Rust严格的内存安全特性在这一部分也让我认识到,使用Rust编写内核代码可以有效减少内存泄漏和非法访问的风险。 | ||
|
||
3. **Lab3** | ||
Lab3正式引入进程管理模块,让我体验了创建、销毁和切换进程的完整流程,并加深了我对进程生命周期的理解。在实现进程管理的过程中,我学会了如何使用Rust语言安全地处理进程状态和资源,并且对Rust在并发编程中的优势有了更深刻的认识。 | ||
|
||
4. **Lab4** | ||
|
||
第六章引入了文件系统代替了原先全部加载入内存的形式。 | ||
|
||
整个文件系统抽象层很细致 层间接口都进行了讲解 但是由于抽象层级比较多 所以理解起来比较困难 综合来看 这一章是我认为难度最大的章节. | ||
|
||
虽然最难 但带给我的收获也很大 | ||
|
||
1. 从系统思维的角度来说 这个Lab对我的抽象能力进行了锻炼 让我对抽象特别是系统中的抽象实现和抽象意义有了更深层的理解 | ||
2. 从系统实现的角度来说 这个Lab让我对文件系统有了基本的了解 知道文件系统的工作方式与基本结构 初步理解文件系统 | ||
3. 从Rust学习的角度来说 这个Lab中文件系统的实现使用了大量的闭包以及一些线程安全的包裹 使我对Rust语言以及闭包的理解加深 | ||
|
||
文件系统部分让我理解了基本的文件操作以及IO重定向的实现原理。通过实现简单的文件系统,我掌握了文件的创建、读取、写入与管理,同时也对设备文件、普通文件的区别有了更清晰的认识。 | ||
|
||
5. **Lab5** | ||
|
||
这个Lab引入的是始终处于当代计算机科学最前沿的画题——并发。 | ||
|
||
死锁的实验让我理解了如何在多任务环境中进行资源分配与调度,从而避免死锁的发生。通过Rust的并发工具,我能够编写银行家算法,这让我对传统并发编程中常见的竞争条件和数据一致性问题有了更深入的认识。 | ||
|
||
**总结与收获** | ||
|
||
通过这两阶段的学习,我不仅提高了Rust编程能力,还深入了解了操作系统的基本原理和机制。Rust语言的内存安全和并发特性在系统编程中表现出了独特的优势,这次夏令营让我对Rust的实际应用和操作系统的开发有了更深刻的理解。对于未来,我希望能进一步探索Rust在系统软件开发中的更多可能性,并在实践中积累更多的经验。 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please mind your modification to this file
do not edit unrelated files