-
Notifications
You must be signed in to change notification settings - Fork 205
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
rCore-Tutorial-Book-v3/chapter3/5exercise #37
Comments
BinaryHeap 是 std::collections 里的,但是我们无法使用 std,这该如何是好? |
作业要求实现 sys_gettime() 但提供的仓库里已经实现的是 sys_get_time()。 这两个的确是不同的函数还是只是笔误?另外测例里指出,gettime 有两个参数 ts: &TimeVal, tz: usize,其中的 TimeVal(sec, usec) 分别是指什么? |
可以用alloc::collections::binary_heap::BinaryHeap, 不过似乎需要先实现heap allocator,可参考下一章第一节。 |
那么可以不使用BinaryHeap而是直接用O(n)枚举方法完成作业么 |
如果按照 guide.md 里的语义,gettime返回值是 0 或 -1,而不是返回时间值本身,那么测例里面 get_time() < wait_for 岂不是没有意义了,应该全部改掉才对。 |
测例里面user系统调用的实现和示例代码也是不同的 |
可以用这个crate,提供了不用动态分配内存的一些数据结构 |
Hi, 我怀疑 |
简答2的chapter5相关代码是不是指向错了,应该是scheduler(L119-L138)指向的是allocproc(L90-L98) |
为什么会有 Panicked at src/syscall.rs:130, sys_exit never returns! |
ch3-lab 的代码,跟当前版本的实验内容对不上。 |
you can copy user test from this: |
你好,这里的实验代码不太能对上吧,在实验要求里 fn sys_task_info(id: usize, ts: *mut TaskInfo) -> isize 要求两个参数,id和ts,但是在测试代码中 assert_eq!(0, task_info(&info)); 只使用了一个参数,请问是不是我哪里理解错了 |
以最新的这个rCore-Tutorial-Code-2023S 实验指导书为准吧,这个 Tutorial 的维护好像停了,最新版的接口是对应的上的。 另外如果你是自己跟着 tutorial 把 OS 搭起来的, 测例中的 write 仅有一次。
除此之外需要保证仅有 ch3_taskinfo 在运行, 不然几个时间点会产生很大偏差。 fn sys_task_info(ti: *mut TaskInfo) -> isize
struct TaskInfo {
status: TaskStatus,
syscall_times: [u32; MAX_SYSCALL_NUM],
time: usize
} |
[Ch3] update user module to 2021autumn version
chapter3练习 — rCore-Tutorial-Book-v3 0.1 文档
https://rcore-os.github.io/rCore-Tutorial-Book-v3/chapter3/5exercise.html
The text was updated successfully, but these errors were encountered: