mirror of
https://github.com/LearningOS/rust-based-os-comp2022.git
synced 2026-11-04 22:44:53 +08:00
update guide index, ch3:5exercise
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
chapter3练习
|
||||
=======================================
|
||||
|
||||
编程作业
|
||||
Lab1 编程作业
|
||||
--------------------------------------
|
||||
|
||||
获取任务信息
|
||||
@@ -43,13 +43,13 @@ ch3 中,我们的系统已经能够支持多个任务分时轮流运行,我
|
||||
实验要求
|
||||
+++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
- 完成分支: ch3。
|
||||
- `lab1(os3)参考框架: <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/os3-ref>`
|
||||
|
||||
- 实验目录要求
|
||||
|
||||
.. code-block::
|
||||
|
||||
├── os(内核实现)
|
||||
├── os3(内核实现)
|
||||
│ ├── Cargo.toml(配置文件)
|
||||
│ └── src(所有内核的源代码放在 os/src 目录下)
|
||||
│ ├── main.rs(内核主函数)
|
||||
@@ -77,11 +77,11 @@ ch3 中,我们的系统已经能够支持多个任务分时轮流运行,我
|
||||
--------------------------------------------
|
||||
|
||||
1. 正确进入 U 态后,程序的特征还应有:使用 S 态特权指令,访问 S 态寄存器后会报错。
|
||||
请同学们可以自行测试这些内容 (运行 `Rust 三个 bad 测例 (ch2b_bad_*.rs) <https://github.com/LearningOS/rCore-Tutorial-Test-2022S/tree/master/src/bin>`_ ,
|
||||
请同学们可以自行测试这些内容 (运行 `Rust 三个 bad 测例 (ch2b_bad_*.rs) <https://github.com/LearningOS/rust-based-os-comp2022/tree/main/user/src/bin>`_ ,
|
||||
注意在编译时至少需要指定 ``LOG=ERROR`` 才能观察到内核的报错信息) ,
|
||||
描述程序出错行为,同时注意注明你使用的 sbi 及其版本。
|
||||
|
||||
2. 深入理解 `trap.S <https://github.com/LearningOS/rCore-Tutorial-Code-2022S/blob/ch3/os/src/trap/trap.S>`_
|
||||
2. 深入理解 `trap.S <https://github.com/LearningOS/rust-based-os-comp2022/blob/main/os3-ref/src/trap/trap.S>`_
|
||||
中两个函数 ``__alltraps`` 和 ``__restore`` 的作用,并回答如下问题:
|
||||
|
||||
1. L40:刚进入 ``__restore`` 时,``a0`` 代表了什么值。请指出 ``__restore`` 的两种使用情景。
|
||||
|
||||
Reference in New Issue
Block a user