简体   繁体   English

在XV6中执行停止的进程

[英]Executing a Stopped Process in XV6

I wrote two new system calls and add them to the xv6 OS kernel. 我编写了两个新的系统调用,并将它们添加到xv6 OS内核中。 So using one system call I can save process state and using the other one I can reload the previous state and continue. 因此,使用一个系统调用可以保存进程状态,而使用另一个系统调用可以重新加载先前的状态并继续。 the problem is in the reloading section . 问题出重装部分


is it enough to reload just the context of the process ? 仅重新加载流程上下文就足够了吗? (i mean the struct context which contains some CPU register) (我的意思是包含一些CPU寄存器的struct context

No. 没有。

The process may have open files and pipes in proc->ofile , which you need to save/load. 该过程可能在proc->ofile具有打开的文件和管道,您需要保存/加载它们。

Note also that by the time you re-load a process, its parent may no longer exist. 还请注意,当您重新加载流程时, parent可能不再存在。
You'll really want to make sure your process isn't floating around without a real parent, or you'll be in for some fun bugs. 您真的要确保没有真正的父母时您的过程不会浮出水面,否则您会遇到一些有趣的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM