rCore-Tutorial-Book-v3 icon indicating copy to clipboard operation
rCore-Tutorial-Book-v3 copied to clipboard

rCore-Tutorial-Book-v3/chapter5/4exercise

Open utterances-bot opened this issue 4 years ago • 6 comments

chapter5 练习 — rCore-Tutorial-Book-v3 0.1 文档

https://rcore-os.github.io/rCore-Tutorial-Book-v3/chapter5/4exercise.html

utterances-bot avatar Mar 11 '21 11:03 utterances-bot

并通过 并通过 Rust测例 中chapter5对应的所有测例。

笔误了

tutorial 里面 waitpid 的实现是非阻塞的,但测例要求实现成阻塞的,应该以测例为准吗? 另外 ch5 之后 OS 运行需要 initproc.rs, 测例仓库并没有包含这个文件。

zhanghx0905 avatar Mar 11 '21 11:03 zhanghx0905

(而且阻塞不是第八章的内容吗。。。

zhanghx0905 avatar Mar 11 '21 11:03 zhanghx0905

waitpid 需要改造成阻塞的,但是只需要子进程没有结束就 yield 就好了,比较简单。 initproc 可以直接替换成 ch5_usertest,不过有一个统一的启动进程也比较优雅,测例会尽快调整。

DeathWish5 avatar Mar 13 '21 14:03 DeathWish5

更新上一条:rust 版本 waitpid 不需要改,阻塞将在用户态实现。

DeathWish5 avatar Mar 13 '21 18:03 DeathWish5

Rust测例里的wait函数目前是非阻塞的,是不是应该改成造成阻塞?

RainaX avatar Mar 16 '21 06:03 RainaX

抱歉请忽略上一条,是我没更新……

RainaX avatar Mar 16 '21 06:03 RainaX