-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from ChoHee15/master
2023秋冬rCore训练营第二阶段总结-ChoHee15
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: 2023秋冬rCore训练营第二阶段总结-ChoHee15 | ||
date: 2023-11-01 22:47:18 | ||
tags: | ||
- author:ChoHee15 | ||
--- | ||
|
||
## 2023秋冬rCore训练营第二阶段总结 | ||
|
||
以“进化”的形式来讲述操作系统确实很有意思,同时能让了解到一些os的历史(但代价是什么:每章都要合并代码啊喂 | ||
|
||
### Lab1-ch3 | ||
|
||
这个syscall还是很直观的,加一些标志然后相应写一些函数就行了。(没想到几行代码合了三回 | ||
但是直接给个大数组感觉还是太粗糙了,拷贝一下感觉开销也不小的样子,但是也没想到其他好办法。 | ||
简答作业要求理解trap的过程,细读,细读。(写过pa的看到这个有种亲切感 | ||
|
||
|
||
### Lab2-ch4 | ||
|
||
由于rcore用了双页表,内核代码也没法直接掏到应用的数据,得手动查一轮;``sys_get_time``和``sys_task_info``都需要往用户的某个地址写数据,都得重写一下儿(Nanos-lite:陌生的设计 | ||
|
||
``mmap``和``munmap``大都可以复用或者照猫画虎现有api搞出来。 | ||
|
||
|
||
### Lab3-ch5 | ||
|
||
``sys_spawn``的处理就是新建进程但是要维护父子关系。(文档同时解答了我对于“为什么先得来个fork再exec”的疑问 | ||
stride算法也比较形象,和``sys_taskinfo``一样有想法了就容易实现,简单但是有效√ | ||
|
||
|
||
### 总结 | ||
|
||
总的来说二阶段读大于写,理解要干什么比较重要,有想法以后码一码调一调还是比较容易成的。(感觉rust比较难 | ||
rust也能保证不会出现太玄学的错误~~我才没有在ch4乱玩指针导致segmentfault捏~~ | ||
|
||
非常好rcore,使我的qemu spin√ | ||
|
||
|