Re: 关于lab5

2 views
Skip to first unread message

Yu Chen

unread,
Apr 5, 2012, 9:06:39 PM4/5/12
to 厳梟, os-course, yos-c...@googlegroups.com
lab5的实验能够完成的一个前提是lab2~lab4的实现都是比较正确的(注意,所有lab没有完全正确,只能是在测试范围内比较正确)。
根据你描述的输出,我觉得一个可能是在对lab4的某些处理有误。
比如 你出错的地方的输出是:(大约在trap.c::pgfault_handler)
    if (check_mm_struct != NULL) {
        assert(current == idleproc);
        mm = check_mm_struct;
    }

如果check_swap正常结束后,check_mm_struct应该设置为NULL,
请在在monitor中输入:
backtrace
命令
应该可以根据调用栈关系列表看到是在哪里出现的错?


在 2012年4月5日 下午9:28,厳梟 <shio...@gmail.com>写道:
陈老师:
做了一晚上lab5 在make的时候出现了如下错误

swap_out: i 0, store page in vaddr 0x5000 to disk swap entry 6
swap_in: load disk swap entry 5 with swap_page in vadr 0x4000
check_swap() succeeded!
++ setup timer interrupts
page fault at 0x0000005b: K/R [no page found].
kernel panic at kern/trap/trap.c:144:
    assertion failed: current == idleproc
Welcome to the kernel debug monitor!!
Type 'help' for a list of commands.
K> 


我感觉理论上在这里应该不会出现page fault的,而且是一个很奇怪的0x0000005b。我把current的pid输出发现是1,也就是说在内核线程initproc出现的这个问题。这个时候lab5创建用户进程的代码还没有运行,也就是说是lab4的问题?可是我lab4的输出和说明文档给出的一样额。。



--
Best Regards
==============================================
Chen Yu
Ph.D.  Associate Professor
System Software&Software Engineering Group,
Laboratory of Pervasive Computing,
Dept. of Computer Science and Technology
Tsinghua University, Beijing 100084, P.R. China
E-Mail: mailto:yuc...@tsinghua.edu.cn  chy...@gmail.com
==============================================
Reply all
Reply to author
Forward
0 new messages